Merge from 1.17wmf1: r84259
authorChad Horohoe <demon@users.mediawiki.org>
Wed, 6 Apr 2011 13:50:45 +0000 (13:50 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Wed, 6 Apr 2011 13:50:45 +0000 (13:50 +0000)
languages/Language.php

index e92fdc0..8e62c3b 100644 (file)
@@ -1863,8 +1863,7 @@ class Language {
                        return $s;
                }
 
-               $isutf8 = preg_match( '/^([\x00-\x7f]|[\xc0-\xdf][\x80-\xbf]|' .
-                               '[\xe0-\xef][\x80-\xbf]{2}|[\xf0-\xf7][\x80-\xbf]{3})+$/', $s );
+               $isutf8 = ( $s == iconv("UTF-8","UTF-8//IGNORE", $s));
                if ( $isutf8 ) {
                        return $s;
                }