From: Juergen Strobel Date: 2006-06-16T07:33:06+09:00 Subject: Re: Unicode roadmap? --oTHb8nViIGeoXxdp Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jun 16, 2006 at 03:39:00AM +0900, Austin Ziegler wrote: > On 6/15/06, Juergen Strobel wrote: > [ snip essentially accurate information ] >=20 > >UTF-8 encodes every Unicode code point as a variable length sequence > >of 1 to 4 (I think) bytes. >=20 > It could be up to six bytes at one point. However, I think that there > is still support for surrogate characters meaning that a single glyph > *might* take as many as eight bytes to represent in the 1-4 byte > representation. Even with that, though, those are rare and usually > user-defined (private) ranges IIRC. This also doesn't deal with > (de)composed glyphs/combining glyphs. No. According to wikipedia, it is upt to 4 bytes for plain UTF8 for all characters. Only Java may need more than that because of their use of UTF16 surrogates and special \0 handling in an intermediary step. See http://en.wikipedia.org/wiki/UTF-8 >=20 > >Currently Unicode requires 21 bit, but this has changed in the past. >=20 > Yes. Unicode went from 16-bit (I think) to 32-bit to 21-bit. >=20 > >Java got bitten by that by defining the character type to 16 bit and > >hardcoding this in their VM, and now they need some kludges. >=20 > Um. I think that the initial Java definition used UCS-2 (same as > Windows did for NTFS and VFS) but now uses UTF-16, which has surrogate > support (UCS-2 did not). >=20 > -austin Java has its own *character* type apart from string. Like C's char, only it is 16 bits wide, and is not directly related to internal string encoding. Note that Java strings are more than a simple sequence of objects of character type. And 16 bits is not enough for some Unicode characters, which leads to the weird situation of needing two character objects to represent a single character sometimes (via surrogates). J=FCrgen > --=20 > Austin Ziegler * halostatue@gmail.com * http://www.halostatue.ca/ > * austin@halostatue.ca * http://www.halostatue.ca/feed/ > * austin@zieglers.ca >=20 >=20 --=20 The box said it requires Windows 95 or better so I installed Linux --oTHb8nViIGeoXxdp Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (GNU/Linux) iQEVAwUBRJHgHvy64gyiEfXtAQJB2wgAmtUBPjrU+3G1WpMgRjQ6u6jR7lTVSjfx 0OIfMcyre5PT45380SwJH/5sGACN0vOCbCzCgj6ZjAfBDsY6JgU7dO0w3sIE/Xkd EW1v1+vTFIhmLHGQAx85tlGFbVW5SzOC/Y1BfRoqwYrzAl1Z5qCs+M+solJ9jrKH ZJ2j5KKnP82cjPlzzfR/Fpvd2EsLef6bv0MHuoGxD1pYpE4dVmK7xUg6ilH8/Y0K PVVXrk1ymmbu+5o7MVETr9ovJUyTcGFlF6k31LyKQ33cft/egVw8UwGsI8rSU1Q/ AxGfVPBl/5jEVjMVLWRzi9i3vRqy2QrFgjeEEOsC9O1iGbiznQRlqg== =DGh/ -----END PGP SIGNATURE----- --oTHb8nViIGeoXxdp--