On 28 Jun 2001, Brian Jones wrote:
> Patrick Doyle <[EMAIL PROTECTED]> writes:
>
> > The closest thing to sanity I can think of is to convert the UTF8-encoded
> > characters into a char array and then use the String(char[], length)
> > constructor. AFAIK I would have to implement the conversion myself.
> >
> > Does this seem like the right approach?
>
> I don't know if this matters, but your approach seems to ignore locale
> encoding.
Yes, I had considered that briefly, but the JVM spec doesn't mention
locale encoding in its description of the constant pool. A
CONSTANT_String entry points to a CONSTANT_Utf8 entry, and the conversion
of that to Unicode is described in the spec, section 4.4.7:
http://java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.html#7963
That appears to be all there is to the story. Am I missing something?
Thanks for your help.
--
Patrick Doyle
[EMAIL PROTECTED]
_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath