OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
RE: [xml-dev] [ Revision #2 ] 15 elementary truths about XML

On Thu, 2011-11-03 at 09:01 -0700, David Lee wrote:
> Concrete case:  Java "String" objects do not use "bytes" to encode strings.
> They use "16 bit ints". 
> Saying something is encoded in "Bytes" to me emplies
> a encoding format such as UTF8 or some such which translates codepoints to a
> stream of bytes.
> Java strings store the codepoints directly, no encoding or decoding to a
> stream of bytes is done unless you write it to a file or byte array.

Since Unicode is a 32-bit character set, Java is not storing the
codepoints directly in all cases, but only the ones that fit; to be fair
those are by far the most common in most environments in which Unicode
is used today.

We are straying, I think, a little far, but, an understanding of
character representation is important to anyone working with text.



Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/
Ankh: irc.sorcery.net irc.gnome.org www.advogato.org

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS