3 include_once("Utf8Case.php");
5 class LanguageAr
extends LanguageUtf8
{
8 # Inherit everything except...
10 function isRTL() { return true; }
12 function getDefaultUserOptions () {
13 global $wgDefaultUserOptionsEn;
14 $opt = $wgDefaultUserOptionsEn;
16 # Swap sidebar to right side by default
21 function checkTitleEncoding( $s ) {
22 global $wgInputEncoding;
24 # Check for non-UTF-8 URLs; assume they are windows-1256?
25 $ishigh = preg_match( '/[\x80-\xff]/', $s);
26 $isutf = ($ishigh ?
preg_match( '/^([\x00-\x7f]|[\xc0-\xdf][\x80-\xbf]|' .
27 '[\xe0-\xef][\x80-\xbf]{2}|[\xf0-\xf7][\x80-\xbf]{3})+$/', $s ) : true );
29 if( $ishigh and !$isutf )
30 return iconv( "windows-1256", "utf-8", $s );