Nuralanur
6/11/2005 12:20:00 PM
Dear Alex,
you can test for equality in regexps for different encodings in Ruby
Equality---Two regexps are equal if their patterns are identical, they have
the same character set code, and their casefold? values are the same
/abc/ == /abc/x » true /abc/ == /abc/i » false
/abc/u == /abc/n
» false
The lang parameter enables multibyte support for the regexp: `n', `N' =
none, `e', `E' = EUC, `s', `S' = SJIS, `u', `U' = UTF-8.
That's information from the "Pragmatic Programmer's guide."
Unfortunately, I could not test it on a Mac ... There seems to be a special
encoding
for Mac, but maybe you can force it to use UTF-8 or something...
Hope that helps.
Best regards,
Axel