From: Damien Wyart Date: 2002-02-14T06:15:02+09:00 Subject: Re: Regexps and latin-1 * Erik B�gfors in comp.lang.ruby: > Ehhh... Why shouldn't ruby or perl be able to handle latin-1 > characters ? This is not what I meant... > I use both languages with files that includes latin-1 characters alot > and have never had any problems with it. The main point here is to take accented letters into account as letters when using character classes in regexps, and to sort them correctly when using sort functions. For now, in Ruby, \w doesn't handle accented letters (one solution seems to be the addition of [�-�]), and doesn't sort them correctly (ie e < � < f ). About Perl, I do not know -I do not use it). With Python, these two points are OK, on one condition : invoking by hand the correct locale. Not very elegant, but it works fine : \w includes accented letters, and sorting deals with them correctly. -- Damien Wyart