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