From 6bbee652e60b6b83f5605c387746f341c54167e7 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sun, 1 Aug 2004 18:39:44 +0000 Subject: [PATCH] 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 --- languages/LanguageUtf8.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 ); } -- 2.20.1