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

git-svn-id: https://develop.svn.wordpress.org/trunk@23361 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2013-01-31 01:55:09 +00:00
parent 2b5a4c5596
commit 98cbf77a95

View File

@ -785,6 +785,19 @@ function remove_accents($string) {
chr(199).chr(155) => 'U', chr(199).chr(156) => 'u', 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); $string = strtr($string, $chars);
} else { } else {
// Assume ISO-8859-1 if not UTF-8 // Assume ISO-8859-1 if not UTF-8