Skip to content

Instantly share code, notes, and snippets.

@dlueth
Created June 27, 2013 21:29
Show Gist options
  • Save dlueth/5880567 to your computer and use it in GitHub Desktop.
Save dlueth/5880567 to your computer and use it in GitHub Desktop.
PHP modifier to transliterate a given string (requires iconv, mb_string)
function transliterate($value, $characterset) {
return iconv(mb_detect_encoding($value, NULL, true), $characterset . '//IGNORE//TRANSLIT', trim($value));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment