Sha256: a7642e37f2cf032ad1116311191f51e8de9aaf642d738f3b91413c693d746f6a

Contents?: true

Size: 1.44 KB

Versions: 1

Compression:

Stored size: 1.44 KB

Contents

= ffi-icu

Simple FFI wrappers for things I need from ICU.

= Dependencies

ICU - you might need to hack the ffi_lib call to make it work. Please send a patch if you do!

= Features

== Character Encoding Detection

=== Examples:

  match = ICU::CharDet.detect(str)
  match.name       # => "UTF-8"
  match.confidence # => 80

or

  detector = ICU::CharDet::Detector.new
  detector.detect(str)
  detector.close

=== Why not just use rchardet?

* this is faster
* rchardet does not work well on 1.9
* none of the rchardet forks claiming to work on 1.9 actually does

== Locale Sensitive Collation

=== Examples:

  ICU::Collation.collate("nb", %w[å æ ø]) == %w[æ ø å] #=> true

or

  collator = ICU::Collation::Collator.new("nb")
  collator.compare("a", "b")  #=> -1
  collator.greater?("z", "a") #=> true
  collator.collate(%w[å æ ø]) #=> ["æ", "ø", "å"]

= Tested on:

Platforms:

* OS X 10.6
* Debian Linux
* Arch Linux

Rubies:

* MRI 1.9.1
* MRI 1.8.7

YMMV.

== Note on Patches/Pull Requests

* Fork the project.
* Make your feature addition or bug fix.
* Add tests for it. This is important so I don't break it in a
  future version unintentionally.
* Commit, do not mess with rakefile, version, or history.
  (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
* Send me a pull request. Bonus points for topic branches.

== Copyright

Copyright (c) 2010 Jari Bakken. See LICENSE for details.

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ffi-icu-0.0.1 README.rdoc