Faster remove accents. Props skeltoac. fixes #2978

git-svn-id: http://svn.automattic.com/wordpress/trunk@4050 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2006-07-26 22:55:36 +00:00
parent 4e7aacfc21
commit 45cacb257a

View File

@ -149,6 +149,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