From 98cbf77a954f50615f9adfad847d9b22ce84d05c Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 31 Jan 2013 01:55:09 +0000 Subject: [PATCH] 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 --- wp-includes/formatting.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index 792b478df8..0947772880 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -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