This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Problem on Solaris (encoding???)
- To: Martin Kahlert <martin dot kahlert at infineon dot com>
- Subject: Re: Problem on Solaris (encoding???)
- From: Jeff Sturm <jsturm at one-point dot com>
- Date: Thu, 10 May 2001 12:49:02 -0400 (EDT)
- cc: java at gcc dot gnu dot org
On Thu, 10 May 2001, 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