Skip to content

Instantly share code, notes, and snippets.

@apeiros
Created September 27, 2013 08:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save apeiros/6725723 to your computer and use it in GitHub Desktop.
Save apeiros/6725723 to your computer and use it in GitHub Desktop.
Encoding woes
# Same result for the same IBM437 character - whether it's utf-8 or IBM437 encoded at input
JSON.parse(JSON.dump(["\u2561".encode('IBM437')])).first.unpack("U*") # => [9569]
JSON.parse(JSON.dump(["\u2561"])).first.unpack("U*") # => [9569]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment