Tweak the UTF-8 case conversion regexps to avoid a problem when the first
authorBrion Vibber <brion@users.mediawiki.org>
Sun, 1 Aug 2004 18:39:44 +0000 (18:39 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sun, 1 Aug 2004 18:39:44 +0000 (18:39 +0000)
character is an apostrophe (').
* [ 1001563 ] Articles starting with ' are not reachable

languages/LanguageUtf8.php

index 8498228..c855305 100644 (file)
@@ -21,7 +21,7 @@ class LanguageUtf8 extends Language {
                # But that doesn't work right in a UTF-8 locale
                global $wikiUpperChars;
                return preg_replace (
-               "/^([\\x00-\\x7f]|[\\xc0-\\xff][\\x80-\\xbf]*)/e",
+               "/^([a-z]|[\\xc0-\\xff][\\x80-\\xbf]*)/e",
                "strtr ( \"\$1\" , \$wikiUpperChars )",
                $string );
        }
@@ -29,7 +29,7 @@ class LanguageUtf8 extends Language {
        function lcfirst( $string ) {
                global $wikiLowerChars;
                return preg_replace (
-               "/^([\\x00-\\x7f]|[\\xc0-\\xff][\\x80-\\xbf]*)/e",
+               "/^([A-Z]|[\\xc0-\\xff][\\x80-\\xbf]*)/e",
                "strtr ( \"\$1\" , \$wikiLowerChars )",
                $string );
        }