From: Michal Suchanek Date: 2006-03-09T03:31:16+09:00 Subject: Re: unicode in ruby On 3/8/06, Logan Capaldo wrote:>> On Mar 8, 2006, at 1:13 PM, Richard Gyger wrote:>> > so, you guys are telling me a language developed since the year> > 2000 doesn't support unicode strings natively? in my opinion,> > that's a pretty glaring problem.> >>> Ruby doesn't really support any strings natively. It just happens to> have a bytevector class that acts a lot like a string ;) Having said> that, have you tried:> $KCODE="u" # Assumes the source file is encoded as UTF8, effects> literal strings, regexps, etc.>> If your source file is UTF16 or some other non-UTF8 encoding you'll> have to use iconv to get into UTF8 to compare with the literals in> your source. err, no that is not what people want when they speak about downcase in unicode.Sure, you can write a string encoded in utf-8 in your source, andverify it is byte-identical to another string. That is about all youget this way.I suspect regexps won't work right with multibyte characters, fordowncase or case -insensitive regexps you would even need to know thelanguage. Thanks Michal -- Support the freedom of music!Maybe it's a weird genre .. but weird is *not* illegal.Maybe next time they will send a special forces commandoto your picnic .. because they think you are weird. www.music-versus-guns.org http://en.policejnistat.cz