This is the mail archive of the 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]

Solaris -vs- iconv

Now that I am trying to "make check" on Solaris, I went back and reread
the iconv threads.

A bare "gcj" invocation fails on Solaris, which isn't very useful.
Passing --encoding=UTF-8 works, as does LANG=en_US.UTF-8 in my
environment.  But dejagnu needs some help, because it doesn't have the
--encoding hack and libtool supresses my LANG setting (why?).

It seems that Solaris iconv understands all of ISO8859-1, UTF-8,
UCS-2/UTF-16 and plain ASCII just fine.  The problem is that it cannot
translate between arbitrary combinations of those :(

So how do I proceed?

1) Hack libjava.exp for --encoding.

I've done this, but it's a little ugly... I had to get all the cases for
source/bytecode compiling, plus jv-scan.  But maybe I was doing something

Also, this is no help to the Solaris user who actually needs to use "gcj

2) Hack lex.c to do a 2-step character translation.

The native Solaris iconv will translate anything to UTF-8, and there is a
builtin UTF-8 -> UCS-2 translator.  These could be chained to do want we

But since this isn't needed for glibc, I wonder if Solaris is really the
special case?  Does anybody use iconv on any other platforms?

3) Forget about UCS-2 in lex.c.

I suppose there is a good reason for it, but I haven't stared at lex.c
long enough to figure out what.  Strings are converted back to UTF-8
before they are written anyhow.


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