Re: Transliterate vs Unidecode

Damian Janowski
Fri, 16 Jan 2009 16:33:03 -0000

On Fri, Jan 16, 2009 at 1:24 PM, Manfred Stienstra <manfred@gmail.com>
wrote:
>> I''m not entirely satisfied with the way
>> ActiveSupport::Inflector.transliterate works:
>> - "œuf" (egg in French) is transliterated into "uf"
instead of the
>> more logical "oeuf"
>> - "Straße" is transliterated into "Strae" instead
of "Strasse"
>> - "€" is transliterated into nothing (blank string)
>
> Agreed, it has absolutely no value unless you have an English
> application and want to get rid of ''those pesky unreadable
> characters''. Because sensible transliteration is dependent on both
the
> source and destination locale it''s really hard to solve. I think
it
> shouldn''t be included in Rails at all and should be solved in a
> separate library or gem.

I agree with you.

While I may not agree with € => "EU", I think it would be nice if
transliterate relied on Unidecode if the gem is present (very similar
to the approach with the textilize helper).

Basically it means "Rails is running under an environment that cares
about these characters – rely on the gem".