qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Ritchie" <ritch...@apache.org>
Subject Re: XML longstr mapping
Date Wed, 20 Dec 2006 16:20:57 GMT
On 20/12/06, Kim van der Riet <kim.vdriet@redhat.com> wrote:
> 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?

Sorry Kim I was thinking of the encoding on the wire rather than the
other way around.

> >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.
> Kim

Martin Ritchie

View raw message