From: John Joyce Date: 2007-09-29T10:07:27+09:00 Subject: Re: Unicode On Sep 28, 2007, at 4:49 PM, Felipe Contreras wrote: > On 9/21/07, Michal Suchanek wrote: >> On 15/09/2007, Zephyr Pellerin wrote: >>> I hate to discuss something related to the development timeline, >>> I know >>> its tenable, but When will it be reasonable to expect Unicode >>> support >>> from Ruby? >> >> Ruby has unicode support. Sort of. Regexes work in UTF-8 when $KCODE >> is set to "U" (and the default is "N" even in UTF-8 locales, and if >> you specify the -K option in the .rb file it overrides the option >> specified on the command line, heh). >> The non-regex methods do not work but you can convert the string with >> str.scan(/./)[0] or str.unpack "U*", and use stuff like each, >> reverse, >> [], ... >> You have to remember to convert the string back, though. > > What about UTF-16? > > http://blogs.gnome.org/sudaltsov/2007/09/22/ruby-part2/ > > -- > Felipe Contreras > Go to unicode.org There you can read a full explanation (or a brief one) about why you don't need to worry about UTF-16 UTF-8 is all you need. Unicode is something everyone needs to read up on at some point. I have to read up on every now and then because my brain leaks.