gleez/cms — pull request #721 by sergeyklay (2014-04-26 01:18:32+00:00)
Title: Feature utf

#### Added

+ `UTF8::toAscii` — Replaces special/accented UTF-8 characters by ASCII-7 "equivalents"
+ `config/ascii.php` — ASCII replacement map.

##### Note
+ For extending ASCII replacement map please use [Unicode Transliteration Guidelines](http://cldr.unicode.org/index/cldr-spec/transliteration-guidelines)
+ If you need to make modifications to the ASCII replacement map, copy `config/ascii.php` file to your `application/config` folder, and make them in there. This will allow you to upgrade Gleez without losing your custom config.

#### Removed

+ `Text::convert_accented_characters`
+ `UTF8::transliterate_to_ascii`
+ `system/utf8/transliterate_to_ascii.php`

#### Fixed

+ Unit test
+ Codebench test (in paralel commit)

#### Usage

```php
$utf_str1 = 'Привет, Мир!';
$utf_str2 = 'Inglés';
$utf_str3 = 'M$ Åžure';
$utf_str4 = '← × ° Ёжик в тумане ° × →';
$utf_str5 = 'Cocoñùт';
$utf_str6 = 'COCOÑÙТ';

$ascii_str1 = UTF8::toAscii($utf_str1); // Privet, Mir!
$ascii_str2 = UTF8::toAscii($utf_str2); // Ingles
$ascii_str3 = UTF8::toAscii($utf_str3); // M$ Azure
$ascii_str4 = UTF8::toAscii($utf_str4); // x Ezhik v tumane x
$ascii_str5 = UTF8::toAscii($utf_str5); // Coconut
$ascii_str6 = UTF8::toAscii($utf_str6); // COCONUT

$ascii_title1 = URL::title($utf_str1, '-', true); // privet-mir
$ascii_title1 = URL::title($utf_str2, '-', true); // ingles
$ascii_title1 = URL::title($utf_str3, '-', true); // m-azure
$ascii_title1 = URL::title($utf_str4, '-', true); // x-ezhik-v-tumane-x
$ascii_title1 = URL::title($utf_str5, '-', true); // coconut
$ascii_title1 = URL::title($utf_str6, '-', true); // coconut
```