Ticket #23907: 23907.7.diff
File 23907.7.diff, 1.4 KB (added by , 10 years ago) |
---|
-
tests/phpunit/tests/formatting/RemoveAccents.php
94 94 95 95 remove_filter( 'locale', array( $this, '_remove_accents_germanic_umlauts_cb' ) ); 96 96 } 97 98 public function _set_locale_to_danish() { 99 return 'da_DK'; 100 } 101 102 /** 103 * @ticket 23907 104 */ 105 public function test_remove_danish_accents() { 106 add_filter( 'locale', array( $this, '_set_locale_to_danish' ) ); 107 108 $this->assertEquals( 'AeOeAaaeoeaa', remove_accents( 'ÆØÅæøå' ) ); 109 110 remove_filter( 'locale', array( $this, '_set_locale_to_danish' ) ); 111 } 112 97 113 } -
src/wp-includes/formatting.php
798 798 $chars[ chr(195).chr(156) ] = 'Ue'; 799 799 $chars[ chr(195).chr(188) ] = 'ue'; 800 800 $chars[ chr(195).chr(159) ] = 'ss'; 801 } 802 803 if ( 'da_DK' === $locale ) { 804 $chars[ chr(195).chr(134) ] = 'Ae'; 805 $chars[ chr(195).chr(166) ] = 'ae'; 806 $chars[ chr(195).chr(152) ] = 'Oe'; 807 $chars[ chr(195).chr(184) ] = 'oe'; 808 $chars[ chr(195).chr(133) ] = 'Aa'; 809 $chars[ chr(195).chr(165) ] = 'aa'; 801 810 } 802 811 803 812 $string = strtr($string, $chars);