On 2/19/2011 1:30 PM, Ian Pilcher wrote:
On 02/19/2011 02:23 PM, Stefan Ram wrote:
When you use a Windows-1252 editor to edit Java source and
then the Java process prints it to a Windows CP-850 console,
umlauts, like ???, will not be rendered correctly, because
the process will print the character ??? that has the code
in CP 850 that ??? has in Windows 1252.
Windows still isn't using UTF-8?
most things in Windows are done 1 of 2 ways:
using ASCII and codepages;
using UTF-16.
granted, it wouldn't likely be all that difficult to write a UTF-8 ->
UTF-16 console printer, but it will involve the relevant parts of the
Win32 API.
so, the issue may not be so much Windows, but more what the particular
JVM does regarding console output.
most likely, it does the least effort thing, which is to directly emit
bytes, which in turn means ASCII.
if it really matters, there is always JNI and the ability to overload
the PrintStream class...
There are also UTF-8 support.