[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: file.encoding property

From: Brian Jones
Subject: Re: file.encoding property
Date: 23 Sep 2003 00:28:16 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

David Holmes <address@hidden> 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 for where we attempt to find

gnu/java/io/EncodingManager uses System.getProperty("file.encoding",

java/net/ uses System.getProperty("file.encoding",

java/util/logging/ 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/  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 currently so I can't link it.

Brian Jones <address@hidden>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]