WordPress.org

Make WordPress Core

Ticket #2978: remove_accents-faster.diff

File remove_accents-faster.diff, 416 bytes (added by skeltoac, 14 years ago)
  • wp-includes/formatting.php

     
    149149}
    150150
    151151function remove_accents($string) {
     152        if ( !preg_match('/[\x80-\xff]/', $string) )
     153                return $string;
     154
    152155        if (seems_utf8($string)) {
    153156                $chars = array(
    154157                // Decompositions for Latin-1 Supplement