Skip to content

Instantly share code, notes, and snippets.

@jlxw
Created May 25, 2012 03:13
Show Gist options
  • Save jlxw/2785530 to your computer and use it in GitHub Desktop.
Save jlxw/2785530 to your computer and use it in GitHub Desktop.
Convert integer to utf-8 character in Ruby 1.8
[8230].pack('U*')
=> "\342\200\246"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment