[Mediawiki-l] Re: Re: accents not appearing correctly

Brion Vibber brion at pobox.com
Mon Feb 6 20:08:13 UTC 2006

Hugh Prior wrote:
> "Brion Vibber" <brion at pobox.com> wrote:
>> Your text editor will have some sort of encoding setting. Use it.
> Thanks for trying Brion.
> However, in view of the actual problem though, this which you suggest is, 
> sorry to say, complete nonsense.

That's only, sorry to say, because you have no idea what you're talking about.

>  $pageText = "Fédération";
> It is not complex text.
>  It is not as if I am trying to input Chinese via a
> program into a wiki.

Actually, it's exactly like that. Your string contains two non-ASCII characters,
which will need to be properly encoded or you'll get some data corruption.
Specifically, they must be UTF-8 encoded.

There's *no* qualitative difference between "é" and something like "本"; both
are non-ASCII characters and therefore must be properly encoded in the UTF-8
source file.

The symptoms you described are *exactly* the symptoms of a miscoded 8-bit ISO
8859-1 (or Windows "ANSI" or whatever they call it) character in what should be
a UTF-8 text stream.

> If you think that the code, being PHP, still has to be run by a browser,

I'm talking about the text editor you used to save the PHP source file
containing literal strings. There's no "browser" involved in your problem.

-- brion vibber (brion @ pobox.com)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : http://lists.wikimedia.org/pipermail/mediawiki-l/attachments/20060206/d7232069/attachment.pgp 

More information about the MediaWiki-l mailing list