Hugh Prior wrote:
"Brion Vibber" brion@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)