Faster remove accents. Props skeltoac. fixes #2978

git-svn-id: http://svn.automattic.com/wordpress/branches/2.0@4052 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2006-07-26 22:57:15 +00:00
parent b764af3717
commit 0977aef844
1 changed files with 3 additions and 0 deletions

View File

@ -145,6 +145,9 @@ function utf8_uri_encode( $utf8_string ) {
}
function remove_accents($string) {
if ( !preg_match('/[\x80-\xff]/', $string) )
return $string;
if (seems_utf8($string)) {
$chars = array(
// Decompositions for Latin-1 Supplement