What is the simplest way for transliteration of non English characters in ruby. That is conversion such as:
translit "Gévry"
#=> "Gevry"
What is the simplest way for transliteration of non English characters in ruby. That is conversion such as:
translit "Gévry"
#=> "Gevry"
Ruby has an Iconv library in its stdlib which converts encodings in a very similar way to the usual iconv
command
Try taking a look at this script from TechniConseils which replaces accented characters in a string. Example of usage:
"Gévry".removeaccents #=> Gevry