Project

unf

9.86
No release in over 3 years
Low commit activity in last 3 years
There's a lot of open issues
This is a wrapper library to bring Unicode Normalization Form support to Ruby/JRuby.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 1.2.0
>= 0.9.2.2
> 2.4.2

Runtime

 Project Readme

ruby-unf

Synopsis

  • A wrapper library to bring Unicode Normalization Form support to Ruby/JRuby

Description

  • Uses unf_ext on CRuby and java.text.Normalizer on JRuby.

  • Normalizes UTF-8 strings into and from NFC, NFD, NFKC or NFKD

      # For bulk conversion
      normalizer = UNF::Normalizer.instance
      a_bunch_of_strings.map! { |string|
        normalizer.normalize(string, :nfc) #=> string in NFC
      }
    
      # Class method
      UNF::Normalizer.normalize(string, :nfc)
    
      # Instance methods of String
      string.to_nfc
    

Installation

gem install unf

License

Copyright (c) 2011, 2012, 2013 Akinori MUSHA

Licensed under the 2-clause BSD license. See LICENSE for details.