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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -