Login

Snippets by coordt

Snippet List

Convert Unicode to ASCII

Unicode is great, but there are places where the conversion ends up with unintelligible characters. I first noticed this with curly quotes entered in forms on our site. `unicode_to_ascii` converts compound characters to close approximations in ASCII: such as umlaut-u to u, 1/2 (fraction glyph) to 1/2. You can add additional mappings in CHAR_REPLACEMENTS.

  • unicode
  • ascii
  • convert
Read More

coordt has posted 1 snippet.