Use digraphs for German umlauts in remove_accents(). props SergeyBiryukov, ocean90. fixes #3782.

git-svn-id: http://core.svn.wordpress.org/trunk@23361 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2013-01-31 01:55:09 +00:00
parent 42a3edc83d
commit 8dbeee25b9

View File

@ -785,6 +785,19 @@ function remove_accents($string) {
chr(199).chr(155) => 'U', chr(199).chr(156) => 'u',
);
// Used for locale-specific rules
$locale = get_locale();
if ( 'de_DE' == $locale ) {
$chars[ chr(195).chr(132) ] = 'Ae';
$chars[ chr(195).chr(164) ] = 'ae';
$chars[ chr(195).chr(150) ] = 'Oe';
$chars[ chr(195).chr(182) ] = 'oe';
$chars[ chr(195).chr(156) ] = 'Ue';
$chars[ chr(195).chr(188) ] = 'ue';
$chars[ chr(195).chr(159) ] = 'ss';
}
$string = strtr($string, $chars);
} else {
// Assume ISO-8859-1 if not UTF-8