From: Brion Vibber Date: Sun, 1 Aug 2004 18:39:44 +0000 (+0000) Subject: Tweak the UTF-8 case conversion regexps to avoid a problem when the first X-Git-Tag: 1.5.0alpha1~2546 X-Git-Url: http://git.cyclocoop.org/data/Luca_Pacioli_%28Gemaelde%29.jpeg?a=commitdiff_plain;h=6bbee652e60b6b83f5605c387746f341c54167e7;p=lhc%2Fweb%2Fwiklou.git Tweak the UTF-8 case conversion regexps to avoid a problem when the first character is an apostrophe ('). * [ 1001563 ] Articles starting with ' are not reachable --- diff --git a/languages/LanguageUtf8.php b/languages/LanguageUtf8.php index 8498228086..c85530535d 100644 --- a/languages/LanguageUtf8.php +++ b/languages/LanguageUtf8.php @@ -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 ); }