@
timothyqiu 嗯, Ruby 里面每个字符串都有自己的编码,可以看看这个
http://yokolet.blogspot.co.uk/2009/07/design-and-implementation-of-ruby-m17n.html"Ruby multilingualization (M17N) of Ruby 1.9 uses the code set
independent model (CSI) while many other languages use the Unicode
normalization model."
"Under the CSI model, all encodings are handled equally, which means,
Unicode is one of character sets. The most remarkable feature of the
CSI model is that the model does not require a character code
conversion since external and internal character codes are identical.
Thus, the cost for conversion can be eliminated. Besides, we can keep
away from unexpected information loss caused by the conversion,
especially by cutting bits or bytes off. Ruby uses the CSI model, so
do Solaris, Citrus, or other system based on the C library that does
not use __STDC_ISO_10646__."
"Moreover, it is possible to handle various character sets even though
they are not based on Unicode."