Problem on Solaris (encoding???)
Jeff Sturm
jsturm@one-point.com
Thu May 10 09:26:00 GMT 2001
On 2001年5月10日, Martin Kahlert wrote:
> gcj -o hello hello.java --main=hello
> i get this:
> hello.java:0: unknown encoding: `646'
This is a known problem. It's a shortcoming of the Solaris iconv.
Try setting LANG=en_US.UTF-8
> What the heck is 646?
It's the default encoding for the "C" locale. Essentially 7-bit ASCII, I
think.
> Then i used truss to get an idea what is done all the time:
> result: I get about 180000 lines like this:
>> open("./gnu/gcj/convert/Input_646.class", O_RDONLY) Err#2 ENOENT
> open("/home/kahlert/GCC/lib/gnu-gcj-convert-Input_646", O_RDONLY) Err#2 ENOENT
> open("/usr/lib/gnu-gcj-convert-Input_646", O_RDONLY) Err#2 ENOENT
I'd guess UnicodeToBytes.getDefaultEncoder() is responsible. If it fails
to find a default encoding class it will retry Class.forName() each time
it is called.
Normally you wouldn't see so many calls to getDefaultEncoder() though.
Typically it is used only when a new Writer instance is constructed.
Jeff
More information about the Java
mailing list