👩💻 Join our community of thousands of amazing developers!
There are situations where you want to remove all the UTF-8 goodness from a string (mostly because of legacy systems you’re working with). Now, this is rather easy to do. I’ll give you an example: çéß Should be converted to cess. On my mac, I can simply use the following snippet to convert the string: s = "çéß" s = Iconv.iconv('ascii//translit', 'utf-8', s).to_s # returns "c'ess" s.gsub(/\W/, '') # return "cess" Very nice and all, but when I deploy to my Debian 4....