diff options
-rw-r--r-- | _test/cases/inc/utf8_romanize.test.php | 10 | ||||
-rw-r--r-- | inc/utf8.php | 3 |
2 files changed, 13 insertions, 0 deletions
diff --git a/_test/cases/inc/utf8_romanize.test.php b/_test/cases/inc/utf8_romanize.test.php index 28595b594..9aade570b 100644 --- a/_test/cases/inc/utf8_romanize.test.php +++ b/_test/cases/inc/utf8_romanize.test.php @@ -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 : diff --git a/inc/utf8.php b/inc/utf8.php index 99e2fcaa1..966c40c6c 100644 --- a/inc/utf8.php +++ b/inc/utf8.php @@ -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', |