Page MenuHomePhabricator

Error message "LangagueUtf8.php : regex code on line 1"
Closed, ResolvedPublic

Description

After a new install with 1.4beta1, I got the follow error message:
"Error LangagueUtf8.php : regex code on line 1"

http://www.fsd74.org/wiki/info.php


Version: 1.4.x
Severity: normal
OS: Linux
Platform: Other
URL: http://www.fsd74.org/wiki/index.php/Accueil

Details

Reference
bz1042

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 8:06 PM
bzimport set Reference to bz1042.
bzimport added a subscriber: Unknown Object (MLST).

matej wrote:

It's probably because of old LanguageXX.php files. I had same problem (language
Czech) and after LanguageCs.php update, warning message disapear. matej@dvojka.cz

matej wrote:

New LanguageXX.php didn't solve that completly. On some pages in Wikipedia: (and
possibly in Help:) namespace it still shows error messages. Other namespaces are
ok. Error messages disapear after reload from network (in firefox - shift + reload).

For case conversion functions in UTF-8 text, MediaWiki prefers to use the functions provided by PHP's mbstring extension if
present. The fallback code involves loading some big arrays and doing a regular expression match, which is slower and
uses more memory.

The initialization code for the fallback conversion was checking for the presence of the wrong function. mb_strtoupper and
mb_strtolower are only present starting in 4.3.0, so the case arrays were not being loaded when the extension was detected
as present and the fallback converter failed.

An untested fix has been checked into HEAD and REL1_4 branches and will be included in 1.4.1:
http://mail.wikipedia.org/pipermail/mediawiki-cvs/2005-March/007196.html

Feedback to confirm the fix would be nice. :)

fbn wrote:

(In reply to comment #3)

An untested fix has been checked into HEAD and REL1_4 branches and will be

included in 1.4.1:

http://mail.wikipedia.org/pipermail/mediawiki-cvs/2005-March/007196.html
Feedback to confirm the fix would be nice. :)

I chaned 'mb_internal_encoding' to 'mb_strtoupper' in languages/LanguageUtf8.php
as you told me on IRC, did the trick for me.

Thanks,

Frank