Hi everyone,
Recently we moved our websites to CF7 and we got a lot of
problems with the character sets. We support multiple languages and
we started to get a lot of issues related to the german, french or
any other "special" characters like ä, ü, ß or any
other.
Browsing the internet I learned how to fix most of them,
including "<cfprocessingdirective pageencoding="ISO-8859-1">"
into all our pages but we still have one problem that I cannot fix.
Our database backend it's a mySQL 4.1.12 with "UTF-8 unicode"
default character set for all the tables.
If I do a query, for instance:
<cfquery name="get" datasource="dns">
SELECT *
FROM cart
WHERE customer = 12870
</cfquery>
And then I have the following code:
<cfoutput query="get">
#deliverystreet#
</cfoutput>
<cfmail to="xxx@xxx.com" from="xxx@xxx.comm" subject="test
character set" server="localhost" type="HTML"
charset="ISO-8859-1">
#get.deliverystreet#
Pietiläntie 30
</cfmail>
This is what I get on the screen:
Pietiläntie 30
Pietiläntie 30
But this is what I get into the email message:
Pietil?ntie 30
Pietiläntie 30
So, in other words, works fine on the screen, but it doesn't
work with CFMAIL or CFFILE no matter what CHARSET I specify for
these tags. But as you can see, if I just type in the text
"Pietiläntie 30" between the mail tags, the text goes fine.
But If it is a variable output #var# it doesn't. I have into
Application.cfm also the following code:
<cfcontent type="text/html; charset=ISO-8859-1">
<cfset setEncoding("url", "ISO-8859-1")>
<cfset setEncoding("form", "ISO-8859-1")>
I think I already tried everything with no luck to make this
work! I really need help, it's been a while since I am trying to
fix this and it is very very important for me. Thank you!