Skip to content

SixArm.com » Ruby » Unaccent replaces a string's accented characters with ASCII characters.

License

Notifications You must be signed in to change notification settings

stereobooster/sixarm_ruby_unaccent

 
 

Repository files navigation

SixArm.com → Ruby →
Unaccent gem

Gem Version Build Status Code Climate Coverage Status

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.

Install

Gem

Run this command in your shell or terminal:

gem install sixarm_ruby_unaccent

Or add this to your Gemfile:

gem 'sixarm_ruby_unaccent'

Require

To require this gem in your code:

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}")

About

SixArm.com » Ruby » Unaccent replaces a string's accented characters with ASCII characters.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%