This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Problem on Solaris (encoding???)




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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]