Last modified: 2006-08-17 23:57:01 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 7045 - Case-folding CoreParserFunctions don't work for some characters
Case-folding CoreParserFunctions don't work for some characters
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
unspecified
All All
: Normal normal with 2 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
http://cs.wikipedia.org/wiki/%EF%BC%B...
: patch, patch-need-review
Depends on:
Blocks: 7160
  Show dependency treegraph
 
Reported: 2006-08-17 15:49 UTC by Aryeh Gregor (not reading bugmail, please e-mail directly)
Modified: 2006-08-17 23:57 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Untested one-line patch (1.04 KB, patch)
2006-08-17 17:15 UTC, Aryeh Gregor (not reading bugmail, please e-mail directly)
Details
Untested one-line patch (399 bytes, patch)
2006-08-17 17:22 UTC, Aryeh Gregor (not reading bugmail, please e-mail directly)
Details

Description Aryeh Gregor (not reading bugmail, please e-mail directly) 2006-08-17 15:49:11 UTC
See test suite at link.  The functions (uc, ucfirst, lc, lcfirst) are defined in
languages\Language.php at lines 715 on; they basically just execute
mb_strtolower <http://us2.php.net/manual/en/function.mb-strtolower.php> or
-upper on the appropriate characters.  At least many, probably all, of the
characters in question are defined as uppercase/lowercase equivalents in the
Unicode standard <http://www.unicode.org/Public/UNIDATA/CaseFolding.txt>, so
should work correctly.

I would have to install the mbstring extension to test locally whether the
functions themselves are the problem.  Can someone confirm/disconfirm whether
mb_strtolower("\xC5\x98","UTF-8"); works correctly on PHP 5.1.2?
Comment 1 Aryeh Gregor (not reading bugmail, please e-mail directly) 2006-08-17 17:15:35 UTC
Created attachment 2241 [details]
Untested one-line patch

Problem clarified (thanks to Danny_B, who asked me to post this bug in the
first place): the error only seems to occur when the first character of the
string is ASCII.  Since I can't reproduce the bug locally, I can't be sure of
the solution, but it appears to me that there's an extraneous ^ in the regex of
Language::isMultibyte: "return (bool)preg_match( '/[^\x80-\xff]/', $str );"
should be "return (bool)preg_match( '/[\x80-\xff]/', $str );".

The patch needs to be tested on an install with mbstring.
Comment 2 Aryeh Gregor (not reading bugmail, please e-mail directly) 2006-08-17 17:22:17 UTC
Created attachment 2242 [details]
Untested one-line patch

Sigh, I need to find a better text editor . . .
Comment 3 Tim Starling 2006-08-17 23:57:01 UTC
Fixed in r16114

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links