From: Marcin 'Qrczak' Kowalczyk Date: 2002-08-08T06:28:34+09:00 Subject: Re: Unicode in Ruby now? Wed, 7 Aug 2002 16:41:18 +0900, Curt Sampson pisze: > UTF-8 is much less compact than UTF-16 for Asian text. Well, not that much: at most 3/2 times larger. > And in UTF-16, surrogate pairs are encoded with 4 bytes, whereas > they take 6 bytes in UTF-8. No, there are no surrogates in UTF-8. Characters above U+FFFF are encoded in 4 bytes each. Surrogates exist only in UTF-16. Anyway, if variable width is not a problem (and you say it isn't if you defend UTF-16), I would almost always choose UTF-8 as the default. Yes, up to 3/2 larger for Asian text, but twice more compact for ASCII, free of endianness issues, and ASCII-compatible which is very important. -- __("< Marcin Kowalczyk \__/ qrczak@knm.org.pl ^^ http://qrnik.knm.org.pl/~qrczak/