On Apr 15, 2006, at 15:08, Gioele Barabucci wrote:

> How can I convert to lowercase a string that contains accented  
> characters
> encoded in UTF-8?
> String#downcase does not work with accented letters.

I hand-coded that:

   # This library redefines String#tr so that it understands UTF-8.
   require 'jcode'

   def normalize_for_sorting(s)
     return nil if s.nil?
     norm = s.downcase
     norm.tr!('?', 'aeiou')
     norm.tr!('?', 'aeiou')
     norm.tr!('ȥҥޥ?', 'aeiou')
     norm.tr!('?', 'aeiou')
     norm.tr!('?', 'aeiou')
     norm.tr!('?', 'aeiou')
     norm.tr!('?', 'aeiou')
     norm.tr!('?', 'aeiou')
     norm
   end

-- fxn