Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save textarcana/81114 to your computer and use it in GitHub Desktop.

Select an option

Save textarcana/81114 to your computer and use it in GitHub Desktop.
require 'iconv'
# assume windoze_str is a string that contains curly quotes or other windows extended characters
conv = Iconv.new('ASCII//IGNORE//TRANSLIT', 'UTF-8')
# remove MS Word curly quotes and other Windows extended character crap
unicode_str = conv.iconv windoze_str
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment