Skip to content

Instantly share code, notes, and snippets.

@TimLang
Created April 22, 2014 07:18
Show Gist options
  • Save TimLang/11168334 to your computer and use it in GitHub Desktop.
Save TimLang/11168334 to your computer and use it in GitHub Desktop.
force encoding 'GB18030'
"UTF-8 string".encode('GB18030').force_encoding(::Encoding::BINARY)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment