STUB Hungarian language file
[lhc/web/wiklou.git] / languages / LanguageHu.php
1 <?
2 # See language.doc
3 include_once("Utf8Case.php");
4
5 class LanguageHu extends LanguageUtf8 {
6 # Inherit everything
7
8 function checkTitleEncoding( $s ) {
9 global $wgInputEncoding;
10
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 );
15
16 if( $ishigh and !$isutf )
17 return iconv( "iso8859-2", "utf-8", $s );
18
19 return $s;
20 }
21
22 }
23
24 ?>