"Guy N. Hurst" <gnhurst / hurstlinks.com> wrote: > I found the following: > > "M17N - Abbreviation of Multilingualization. Many-languages-izing. > The structure for treating simultaneously the language with > which plurality is different is offered." Oh, It's more fluent in English than me :-) > cf. "M17N/I18N for Ruby" (glossary half-way down) > Japanese: http://www.inac.co.jp/~maki/ruby/ruby-i18n.html This article explains about M17N of Ruby 1.6. It's different from new ruby_m17n model. Ruby1.6 is: (summury of the article) * String is octet data (like Perl<5.6). There is no class for paricular coded character set/encoding, no pragma. * Regexp recognize some encodings as follows: * ASCII and ISO-8859-1(and other 8bit character sets) * EUC-JP * Shift_JIS * UTF-8 So we can use as follows: if /(some_partter_in_utf8)/u =~ some_string_in_utf8 matched_string = $1 end It is (maybe) usable even if some_string_in_utf8 is English, Japanese, or other language. When we split a string by character, we do as follows: splited_chars_array = a_utf8_string.split(//u) first_char_of_string = splited_chars_array[0] * Some extend library is usable as yet-another-(better)-iconv. * There is Intl class, that is wrapper of GNU gettext. * Locale is not supported(in other words, Ruby use no setlocale(3)), because halfway-support of locale considers harmful. New ruby_m17n(Ruby 1.8 or 2.0?) is different, but I've not read m17n.[ch] and string.[ch] carefully yet. Regards, -- TAKAHASHI Masayoshi (maki / inac.co.jp)