[kaffe] question about characters set.
robilad at kaffe.org
Wed Nov 12 10:10:03 PST 2003
jsona laio wrote:
> hi mavens,
> i used to utilize sun java's vm to develop my porject.
> however, lately i want to participate a porject, in
> which involves encoding like CCCII (CJK based
> character for asian characters, which defines more
> characters than unicode supports). however, as i know,
> java vm is based upon unicode (is kaffe based on
> unicode, too?). so i hope to know that "is it possible
> to switch its base encoding", for i'm afraid that code
> value may miss when data exchanging 'twixt two
> character set. or any else better way can avoid such
> i appreciate any suggestions, sincerely.
If I understand you correctly, you'd like to exchange the Unicode core
of a VM for another encoding. The trouble is that it wouldn't be a VM
for Java anymore, as the spec mandates the Unicode usage for Java
programs . The spec explicitely says:
The integral types are byte, short, int, and long, whose values are
8-bit, 16-bit, 32-bit, and 64-bit signed two's-complement integers,
respectively, and char, whose values are 16-bit unsigned integers
representing Unicode characters (§2.1).
If complying to the JVM spec doesn't bother you much, feel free to fork
kaffe and rip the unicode handling code out and replace it with CCCIII.
If you're looking for a more portable solution to character conversion
problems, you may want to take a look at the ICU4J  project from IBM.
More information about the kaffe