3 include_once("Utf8Case.php");
5 class LanguageHu
extends LanguageUtf8
{
8 function checkTitleEncoding( $s ) {
9 global $wgInputEncoding;
11 # Check for non-UTF-8 URLs; assume they are 8859-2
12 $ishigh = preg_match( '/[\x80-\xff]/', $s);
13 $isutf = ($ishigh ?
preg_match( '/^([\x00-\x7f]|[\xc0-\xdf][\x80-\xbf]|' .
14 '[\xe0-\xef][\x80-\xbf]{2}|[\xf0-\xf7][\x80-\xbf]{3})+$/', $s ) : true );
16 if( $ishigh and !$isutf )
17 return iconv( "iso8859-2", "utf-8", $s );