Text Encoding, WWW.UnEscapeURL

I'm having weird problems with the WWW.UnEscapeURL()

We're working on a french translation, but special characters don't show up. but as we all know changing the script to UTF-8 enables special characters, so when I print "" in my code on screen, it works.

Now the peculiar thing happens when I ask text from the server. I get the text from a php page and it encodes my text with rawurlencode (as suggested in another question on this site)

but when I use www.UnescapeURL(www.data), my special characters don't show up, the font I use is Unicode and works because when I print www.UnEscapeURL(www.datat)+"" on screen, the shows up, but in my log the special characters don't get decoded.

so my guess is that the %.. aren't aligned

I'll finish with a small example of what I encounter in my Debug.Log

Mais%20aussi%20un%20oiseau%20un%20peu%20b%EAte%2C%20n%27est-ce%20pas%3F

Translates To:

Mais aussi un oiseau un peu bte, n'est-ce pas?

so the %EA doesn't decode to

After some intensive testing and experimenting, we've found that the rawurlencode was the problem

we just encoded via WWW.escapeURL and saw that there was a difference with rawurlencode throught testing it seems that (in php) urlencode(utf8_encode($string)); is the encoding you should use.

The strange thing is, I thought rawurlencode used to work when I was using 2.5, or was it just my imagination?

How was the text encoded before you escaped it to get the string "Mais%20aussi%20un%20oiseau%20un%20peu%20b%EAte%2C%20n%27est-ce%20pas%3F"?

The use of a single %EA to represent an accented character seems to indicate it was encoded in Windows-1252, not in UTF-8, which should generate two substitution characters. Try encoding the text in UTF-8 before escaping.