This section provides examples of encoded byte sequences of the JVM default encoding, CP1252 encoding and ISO-8859-1 encoding. All 3 seem to be behaving in the same way.
Running the testing program, EncodingSampler.java, provided in the previous section
without any argument will use the JVM's default encoding:
The default encoding of the String class seems to be the same as
OutputStreamWriter: Cp1252.
There are a number of characters that can not be encoded by Cp1252.
The String, OutputStreamWriter, and Charset classes are returning 0x3F
for those non-encodable characters.
It's obvious that Cp1252 works on a character set in the 0x0000 - 0x00FF range.
Running the program again with 'CP1252' as argument should give us the
same output as the previous run: