[Home] [By Thread] [By Date] [Recent Entries]
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. Best, Liam -- 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] |

Cart



