From: Oliver Schad Date: 2010-11-26T02:05:19+09:00 Subject: Re: Ruby 1.8 vs 1.9 Robert Klemme wrote: > On Thu, Nov 25, 2010 at 11:12 AM, Phillip Gawlowski > wrote: >> On Thu, Nov 25, 2010 at 10:45 AM, Robert Klemme >> wrote: >>> >>> This may be true for the western world but I believe I remember one >>> of our Japanese friends state that Unicode does not cover all Asian >>> character sets completely; it could have been a remark about Java's >>> implementation of Unicode though, I am not 100% sure. >> >> Since UTF-8 is a subset of UTF-16, which in turn is a subset of >> UTF-32, > > I tried to find more precise statement about this but did not really > succeed. I thought all UTF-x were just different encoding forms of > the same universe of code points. Yes this is correct. Many people don't get the difference between a charset and the corresponding encoding. Unicode is a charset not with one encoding but with many encodings. So we talk about the same characters and different mappings of this characters to bits and bytes. This mapping is a simple table which you can write down to a paper sheet and the side with the characters will always be the same with UTF-8, UTF-16 and UTF-32. The encodings UTF-8, UTF-16 and UTF-32 were build for different purposes. The number after UTF says nothing about the maximum length in first place it says something about the shortest length (and often about the usual length if you use this encoding in that situation which it was build for). So if people coming from the ascii world use UTF-8, many encodings (mapping of a character to a sequence of bits and bytes) of characters will be inside one byte. UTF-32 is a bit different, in this case 32 bits are a static size of each encoded character. >> and Unicode is future-proofed > > Oh, so then ISO committee actually has a time machine? Wow! ;-) Read as has much encoding space left and nobody of us knows how you could fill the whole space. But humans tend to be wrong. Regards Oli -- Man darf ruhig intelligent sein, man muss sich nur zu helfen wissen