Skip to content

Instantly share code, notes, and snippets.

@vrinek
Created February 4, 2015 15:50
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 vrinek/e076fb4240daf0ab0645 to your computer and use it in GitHub Desktop.
Save vrinek/e076fb4240daf0ab0645 to your computer and use it in GitHub Desktop.
irb(main):065:0> a = "雷"
"雷"
irb(main):066:0> b = a.unpack("C*").pack("C*")
"\xE9\x9B\xB7"
irb(main):067:0> a == b
false
irb(main):068:0> a.bytes == b.bytes
true
irb(main):069:0> a == b.unpack("U*").pack("U*")
true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment