Page MenuHomePhabricator

Latin1 site with UTF8 user language preference converts messages twice
Closed, ResolvedPublic

Description

Author: zigger

Description:
On a site with $wgUseLatin1=true (e.g. en.wikipedia.org) where a user chooses a
different UI language preference, some UTF8-encoded messages get converted
twice, producing ? characters.

Probably every function in LanguageLatin1.php with utf8_decode is suspect.

Examples can be seen in Special:Preferences with toggle fields, and in article
histories with month abbreviations.


Version: 1.4.x
Severity: normal

Details

Reference
bz1488
TitleReferenceAuthorSource BranchDest Branch
Release 1.15.14repos/sre/pybal!3vgutierrezrelease-bullseyebullseye-wikimedia
Release 1.15.14repos/sre/pybal!1vgutierrezrelease-1.14main
d/changelog: bump to 0.0.3repos/cloud/toolforge/builds-cli!19dcarobump_to_0.0.3main
output-sql: Avoid backpressure memory leaks in read/write streamsrepos/mediawiki/services/ipoid!140kharlanbackpressure-7c49main
cli: use the /latest endpointrepos/cloud/toolforge/builds-cli!17dcarouse_latest_endpointmain
Customize query in GitLab

Revisions and Commits

Event Timeline

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

The problem is specifically with those Language methods which work by calling wfMsg() -- which implicitly
converts already if $wgLang is a LanguageLatin1 proxy.

It's also an unsafe general practice, as these functions may not work correctly with wfMsgForContent() or anything
else where you're asking for info from something that's not $wgLang.

Diffusion added a commit: Unknown Object (Diffusion Commit).Mar 4 2015, 8:22 AM