I wrote a test, and I am afraid that it shows that your books is right.
I am running this program with the following command line:
The program contains the following code:
The
word "sue�o" is the Spanish word for "dream". It uses the "�" character, which is not part of the ASCII, but it is part of UTF-8.
If I run this program it prints:
Which means that although I changed the setting of the file encoding to UTF-8, by the time my program manipulated this
String, it still did it with ASCII encoding.
Therefore, the setting from the command line prevailed over the one provided programatically. Just as your book said.
[ September 26, 2007: Message edited by: Edwin Dalorzo ]