[Top][All Lists]

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

Re: Multi-byte locales

From: Michael Koch
Subject: Re: Multi-byte locales
Date: Tue, 18 Oct 2005 08:25:28 +0200
User-agent: Mutt/1.5.9i

On Tue, Oct 18, 2005 at 12:11:30AM +0200, Florian Weimer wrote:
> It seems that with Sun's JDK, some files are unaccessible if you run
> in a multi-byte locale (something which uses UTF-8, for example)
> because it's not possible to specify an UTF-16 string which is encoded
> to the name of the file you are interested, provided that the file has
> a name which is not a valid character sequence in the current locale.
> (This is not a big deal on UCS-2/UTF-16 platforms, but I'm not really
> sure what the designers thought when they tried to fit this model on
> UNIX.)
> Is there some GNU extension which can work around this issue?  On a
> related note, is it possible to access the command line as an array of
> byte arrays?

There is no GNU extension (yet) that van work around this that I'm aware
of. For the other problem use the following untested pseudo-code.

You get the arguments as String[] args:

byte[][] data = new byte[args.length][];
for (int i = 0; i < args.length; i++) {
  data[i][] = args[i].getBytes();

Escape the Java Trap with GNU Classpath!

Join the community at

reply via email to

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