Index: branches/wmf/1.17wmf1/languages/Language.php |
— | — | @@ -1780,8 +1780,7 @@ |
1781 | 1781 | return $s; |
1782 | 1782 | } |
1783 | 1783 | |
1784 | | - $isutf8 = preg_match( '/^([\x00-\x7f]|[\xc0-\xdf][\x80-\xbf]|' . |
1785 | | - '[\xe0-\xef][\x80-\xbf]{2}|[\xf0-\xf7][\x80-\xbf]{3})+$/', $s ); |
| 1784 | + $isutf8 = ( $s == iconv("UTF-8","UTF-8//IGNORE", $s)); |
1786 | 1785 | if ( $isutf8 ) { |
1787 | 1786 | return $s; |
1788 | 1787 | } |