I have an encoding problem with the cfquery tag.
This is my code:
<cfquery name="query" datasource="example">
SELECT *
FROM EXAMPLE_TABLE
WHERE EXAMPLE_COLUMN = 'WORD WITH ACCENT É'
</cfquery>
When doing a cfdump on the query variable, the generated sql by the cfquery tag changes the text to 'WORD WITH ACCENT É' but I need it to be É because the value in the table is set that way. Is there any way to change the encoding of the cfquery tag?
I tried changing the encoding of the page with the cfcontent tag to no avail. I also tried to use SetLocale() without much result either.
Thanks.
I found a solution.
<cfprocessingdirective pageEncoding="UTF-8" />
Added this at the top of the page and it works like a charm.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With