utf 8 - Java unexpected character parsing txt file -


i trying divide txt files arraylist of strings , far works, first words in file starts (int)'65279' , can't copy character here. also, in gui looks second letter of word missing @ same time works in console. other words should be. using utf-8 format .txt files. how can change format in netbeans , gui made in ide?

u+feff byte order mark. it's used indicate character encoding/endianness (to can tell difference between big , little-endian utf-16, example).

if it's causing problem, simplest thing strip it:

if (text.startswith("\ufeff")) {     text = text.substring(1); } 

Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -