Skip to content

Instantly share code, notes, and snippets.

@yannvery
Created December 29, 2013 18:43
Show Gist options
  • Save yannvery/8173411 to your computer and use it in GitHub Desktop.
Save yannvery/8173411 to your computer and use it in GitHub Desktop.
How to downcase accented chars with ruby
# Downcase accented chars
"Île de France".mb_chars.downcase.to_s
# => "île de france"
# Downcase and remove accented chars
I18n.transliterate("Île de france").downcase
# => "ile de france"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment