Skip to content

Instantly share code, notes, and snippets.

@JonathonMA
Created November 28, 2013 02:25
Show Gist options
  • Save JonathonMA/7686382 to your computer and use it in GitHub Desktop.
Save JonathonMA/7686382 to your computer and use it in GitHub Desktop.
require 'unicode_utils'
baffle = 'baffle'
puts baffle # => baffle
puts baffle.upcase # => BAfflE
puts UnicodeUtils.upcase(baffle) # => BAFFLE
noel = 'noël'
puts noel # => noël
puts noel.reverse # => l̈eon
normalized_noel = UnicodeUtils.nfkc noel
puts normalized_noel # => noël
puts normalized_noel.reverse # => lëon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment