qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kim van der Riet <kim.vdr...@redhat.com>
Subject Re: XML longstr mapping
Date Wed, 20 Dec 2006 15:56:29 GMT
On Wed, 2006-12-20 at 15:48 +0000, Martin Ritchie wrote:
> A longstr needs to be capable of handling 2-byte characters while the
> shorstr only deals with ASCII values. I thought String was an ASCII
> string only if that is the case then longstr will need to stay as a
> byte[].
I had thought that String does inherently handle 2-byte characters - it
depends on the codeset/locale used. Fundamentally, String is composed of
2-byte char elements, is it not?

>>From Strings javadoc:
A String represents a string in the UTF-16 format in which supplementary
characters are represented by surrogate pairs (see the section Unicode
Character Representations in the Character class for more information).
Index values refer to char code units, so a supplementary character uses
two positions in a String.


View raw message