UnicodeUtils is a pure Ruby library that implements
Unicode algorithms for Ruby 1.9.
Install with RubyGems:
$ gem install unicode_utils
Example code:
require “unicode_utils”
UnicodeUtils.upcase(“i”, :tr) => “İ”
UnicodeUtils.nfkc(“ﬔ) => “fi”
Online documentation: http://unicode-utils.rubyforge.org
Source: GitHub - lang/unicode_utils: Unicode algorithms for Ruby 1.9
New since the 0.4.0 release:
-
The name method was renamed to char_name because it
conflicted with Module#name. -
Case-folding
-
A grep method to search through the Unicode character
database and “U” as a shortcut for use in irb:
$ irb -r unicode_utils/u
irb(main):001:0> U.grep /angstrom/
=> [#<U+212B “â„«” ANGSTROM SIGN utf8:e2,84,ab>]