java - What happens if your input file contains some unsupported character? -


i have text file might contain unsupported characters in latin1 character set, default character set of jvm.

what characters turned when java program tries read file? concretely, supposed had 2-byte long character in file, read one-byte character (because each character in latin1 1-byte long)?

thanks,

first of can specify character set use when reading file. see example: java.io.inputstreamreader

secondly. yes if reading using 1 byte character set each byte used map 1 character.

thirdly: test , shall see, beyond doubt happens!


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -