|
From: Panayotis K. <pan...@pa...> - 2013-03-18 21:31:13
|
On Fri, Mar 1, 2013 at 4:10 AM, Panayotis Katsaloulis
<pan...@pa...> wrote:
>
> It seems that unicode Strings are still not quite supported by XMLVM.
>
> A simple command like this one:
> String a = "Δοκιμή";
> in the source (under constant pool) becomes something like
>
> // ID=1455: \1624\1677\1672\1671\1674\1656
> (JAVA_ARRAY_CHAR[]) {916, 959, 954, 953, 956, 942},
>
> which looks wrong, if indeed JAVA_ARRAY_CHAR is a char table.
On Sat, Mar 16, 2013 at 2:49 AM, Panayotis Katsaloulis
<pan...@pa...> wrote:
>
> After some thoughts I believe there is a more appropriate solution.
> Java's "char" is actually a "unichar" and I think it should be handled like this most of the time.
> Which actually is a synonym for "unsigned short".
> Thus the produced table is not "wrong", it's just the wrong type.
After some tests, indeed character arrays are handled as arrays of
"unsigned sort" (as I was suggesting). Sorry for not recognise it
earlier.
>From the sources, it seems that indeed the type is "unsigned short"
typedef unsigned short JAVA_ARRAY_CHAR;
Also from Apple's source code, we can find that
typedef UInt16 UniChar;
Which is the same, so everything should (and is) fine.
The only missing part is the escaped sequences of Strings in the comments.
I am not proficient with XSLT, but I can improve the updater ant task,
to take care of such strings and re-construct the original String, if
desired.
--
Panayotis Katsaloulis
|