David Holmes <[EMAIL PROTECTED]> writes:

> Hi everyone,
> 
> The EncodingManager expects the system property file.encoding to be
> set but I couldn't find any indication of who was responsible for
> setting this property, when and where. Is this something that would
> just be set from the command-line? Or should it be determined by
> native code somewhere in the VM startup process?

A grep through the source confirms many complaints about Sun not
documenting this or providing a standard means of getting at the
available encodings.  ;) I think a JVM is supposed to provide this if
they want.  If you do nothing it should still work, but you can
override the default if you want including using file.encoding.pkg to
prepend to the default of gnu.java.io for where we attempt to find
encoders/decoders.

gnu/java/io/EncodingManager uses System.getProperty("file.encoding",
"8859_1");

java/net/URLEncoder.java uses System.getProperty("file.encoding",
"8859_1");

java/util/logging/XMLFormatter.java uses
System.getProperty("file.encoding") and later defaults to "UTF-8" if
null, which seems to be an error either here or in the documentation
in java/io/InputStreamReader.java.  More confusingly we provide
DecoderUTF8 and EncoderUTF8 which implies the EncodingManager would
load on "UTF8" rather than "UTF-8".

There is a hacking guide reference in Chapter 11.  I can't connect to
gnu.org currently so I can't link it.

Brian
-- 
Brian Jones <[EMAIL PROTECTED]>


_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath

Reply via email to