Skip to content

Instantly share code, notes, and snippets.

@cockscomb
Created June 10, 2012 02:28
Show Gist options
  • Save cockscomb/2903611 to your computer and use it in GitHub Desktop.
Save cockscomb/2903611 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
# coding: utf-8
puts ARGV.join(' ').split(//).collect { |s| 'U+%04X' % s.unpack('U')[0] }.join(' ')
#!/usr/bin/env ruby
# coding: utf-8
puts ARGV.collect { |u| u[/U\+([0-9A-Z]+)/, 1].to_i(16) }.pack('U*')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment