|
|
Never thought I would have a problem with unicode, but here it is.
The web site I am working on is ColdFusion MX7 and mySQL 5.0.45. The data in
the DB is UTF-8 encoded, collation is set to utf8_general_ci. The output of the
data from DB is valid, all characters are displayed properly.
Problem starts when I try to update records via site's web interface. I have
attached a piece of code as an example (the whole query is rather large) to
show that there is no charset messing in the query itself. However, whenever I
post unicode characters (the site is bilingual, English and Russian) they get
converted to something weird. For example, small Russia letters "a" converted
into number 0, "b" into number 1 and so on. So whenever I try to post something
like "???????" - I get a bunch of numbers and symbols, some of which are
invisible.
I talked to the hosting support for 2 days already, but they still
"investigating", which sort of leads me to think they have no clue.
<cfquery datasource="skazkaf_skazka">
UPDATE Products SET Catalog=
<cfif IsDefined("FORM.Catalog") AND #FORM.Catalog# NEQ "">
'#FORM.Catalog#'
<cfelse>
NULL
</cfif>
, ProductName=
<cfif IsDefined("FORM.ProductName") AND #FORM.ProductName# NEQ "">
'#FORM.ProductName#'
<cfelse>
NULL
</cfif>
, ProductName_Rus=
<cfif IsDefined("FORM.ProductName_Rus") AND #FORM.ProductName_Rus# NEQ "">
'#FORM.ProductName_Rus#'
<cfelse>
NULL
</cfif>
|
|