Skip to content

Instantly share code, notes, and snippets.

@ondrejbartas
Created February 29, 2012 19:29
Show Gist options
  • Save ondrejbartas/1943804 to your computer and use it in GitHub Desktop.
Save ondrejbartas/1943804 to your computer and use it in GitHub Desktop.
Translate diacritics and unicode chars to ASCII
# -*- encoding : utf-8 -*-
require "active_support"
require 'active_support/inflector'
puts ActiveSupport::Inflector::transliterate("Nějaký ten string ščřžýáíé")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment