lud
lud

Reputation: 2001

Is UTF8 urlEncodedFormat in CFML (BlueDragon JX 7.1) broken?

I have a small file containing the é char and a linebreak. The file is encoded in UTF-8.

When I write urlEncodedFormat(trim(content)) it yields "%C3%A9" and this is correct.

Now, urlEncodedFormat accepts a second argument, according to the docs : "The character encoding in which the string is encoded.".

So, my string is encoded as UTF-8, so if I provide 'utf-8' it should yield the same thing.

But not at all :

urlEncodedFormat(trim(content), 'utf-8') yields "%C3%83%C2%A9".

It works using a iso-8859-1 file, passing this encoding as a second argument does not change the output.

This is how I read the file :

<cffile action="read" file=#filename# variable="content"/>

So why is that ? I can't figure out how encoding works in this language.

Thank you very much.

Upvotes: 1

Views: 45

Answers (0)

Related Questions