SixArm.com » Ruby »
Unaccent gem

Introduction

Replace a string's accent characters with ASCII characters.

Based on Perl Text::Unaccent from CPAN.

For docs go to http://sixarm.com/sixarm_ruby_unaccent/doc

Want to help? We're happy to get pull requests.

Quickstart

Install:

gem install sixarm_ruby_unaccent

Bundler:

gem "sixarm_ruby_unaccent", "=1.0.0"    

Require:

require "sixarm_ruby_unaccent"

Examples

French:

require "sixarm_ruby_unaccent"
str = "déjà vu";
str.unaccent => "deja vu";

Greek:

require "sixarm_ruby_unaccent"
str = "νέα" (aka "\x{03AD}\x{03BD}\x{03B1}")
str.unaccent => "νεα" (aka "\x{03B5}\x{03BD}\x{03B1}")

Changes

  • 2012-03-14 1.0.0 Update docs, tests
  • 2011-10-06 1.0.0 Updates for gem publishing ## License

You may choose any of these open source licenses:

  • Apache License
  • BSD License
  • CreativeCommons License, Non-commercial Share Alike
  • GNU General Public License Version 2 (GPL 2)
  • GNU Lesser General Public License (LGPL)
  • MIT License
  • Perl Artistic License
  • Ruby License

The software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement.

In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.

This license is for the included software that is created by SixArm; some of the included software may have its own licenses, copyrights, authors, etc. and these do take precedence over the SixArm license.

Copyright (c) 2005-2013 Joel Parker Henderson