Skip to content
Snippets Groups Projects
Commit 176ae32b authored by Andreas Gohr's avatar Andreas Gohr
Browse files

Do romanization of certain characters different from what deaccent does FS#1117

Some characters are deaccented/romanized different in different languages, we
now do one way in deaccent and the other way in romanize. Giving the user a
choice what she prefers. (Currently affects a handful scandinavian letters).

darcs-hash:20081011091034-7ad00-08535e03639b0b0c634e2438609ac10545f14f48.gz
parent 3adb3450
No related branches found
No related tags found
No related merge requests found
......@@ -22,5 +22,15 @@ class utf8_romanize_test extends UnitTestCase {
$line++;
}
}
/**
* Test romanization of character that would usually be deaccented in a different
* way FS#1117
*
* @author Andreas Gohr <andi@splitbrain.org>
*/
function test_deaccented(){
$this->assertEqual("a A a A a o O",utf8_romanize("å Å ä Ä ä ö Ö"));
}
}
//Setup VIM: ex: et ts=4 enc=utf-8 :
......@@ -1184,6 +1184,9 @@ $UTF8_SPECIAL_CHARS2 =
*/
global $UTF8_ROMANIZATION;
$UTF8_ROMANIZATION = array(
// scandinavian - differs from what we do in deaccent
'å'=>'a','Å'=>'A','ä'=>'a','Ä'=>'A','ö'=>'o','Ö'=>'O',
//russian cyrillic
'а'=>'a','А'=>'A','б'=>'b','Б'=>'B','в'=>'v','В'=>'V','г'=>'g','Г'=>'G',
'д'=>'d','Д'=>'D','е'=>'e','Е'=>'E','ё'=>'jo','Ё'=>'Jo','ж'=>'zh','Ж'=>'Zh',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment