On Fri, Mar 6, 2009 at 6:02 PM, Jonatas P. firstname.lastname@example.org
Hi, I got a problem try to replace accentuated characters like:
irb(main):002:0* name = “Fênix”
Looks to me like an encoding problem. What source encoding are you
If you set $KCODE = ‘UTF-8’ or append /u to the regex literals does it
resolve the inconsistency?
What’s the difference between /[éê]/ and /é|ê/ ?
In that context there shouldn’t be any difference. The union, |, can
be used for patterns longer than a single character, but the specific
patterns above look equivalent to me. But if the encoding isn’t set
appropriately all bets are off!
ps: ruby -v
ruby 1.8.6 (2007-09-24 patchlevel 111) [x86_64-linux]
ps: the unicode support has apparently been much improved in 1.9.