I need to send a string in French to a server. The server expects one kind of encoding and LC's
URL encoding is producing something different. Not only that, but after sending the LC encoded
text, the server receives something unrelated. I can't identify why. Details:
Original text: Révéler l'archéologie
LC urlEncoded string: R%8Ev%8Eler+l%27arch%8Eologie
LC string arrives at server as: R%EF%BF%BDv%EF%BF%BDler+l%27arch%EF%BF%BDologie
Server expects: R%C3%A9v%C3%A9ler%20l%27arch%C3%A9ologie
So why does the LC encoding arrive at the server in a different form, and why does neither the
LC variable or the text the server receives match each other? And what encoding is it exactly
that the server expects?
I played around with textDecode and a few other things but didn't get anywhere. I know the
server wants UTF8.
On 12/29/20 5:24 PM, Paul Dupuis via use-livecode wrote:
> On 12/29/2020 6:07 PM, J. Landman Gay via use-livecode wrote:
>> Original text: Révéler l'archéologie
>> LC urlEncoded string: R%8Ev%8Eler+l%27arch%8Eologie
> URLEncode(textEncode(<originalText>,"UTF8")) -> gets you a properly URL encoded string where
> the server is expecting UTF8
Thank you, that works (though I need to replace the + with %20.) I had my encoding backwards.