Thanks for the suggestions.
FYI, this particular issue is when reading in a text file that has
been uploaded. The <CFFILE> tag has the charset attribute set to UTF-8
and if I dump to the screen the contents then I can see that it has
been read in correctly. If I copy and paste the content to my SQL
client, it's added correctly to the database. The only issue is when
trying to add to the database from Railo, which uses the following
(where the unicode data is in arrItem._name):
<cfquery name="qryStep" datasource="#variables.dsn#">
INSERT INTO step ( test_id
, task_id
, _name
, _value
, active )
VALUES ( <cfqueryparam cfsqltype="cf_sql_integer"
value="#intTestID#">
, <cfqueryparam cfsqltype="cf_sql_integer"
value="#arrItem.task_id#">
, <cfqueryparam cfsqltype="cf_sql_varchar"
value="#arrItem._name#">
, <cfqueryparam cfsqltype="cf_sql_varchar"
value="#arrItem._value#">
, <cfqueryparam cfsqltype="cf_sql_integer" value="1"> );
</cfquery>
It feels like it's a driver issue between Railo & MySQL, but I got the
impression that that had been fixed fairly recently.
Has anybody got any other suggestions?
Thanks,
Dan
On Feb 22, 8:15 pm, Michael Offner <
mich...@getrailo.com> wrote:
> be careful simply setting everything to UTF-8, most code/text editors do
> not use UTF-8. the default value for the template/resource charset is the
> OS default charset and this for a good reason. most text/code editors use
> this charset.
> UTF-8 is not the "universal charset" that solve everything.
>
> But Sean is right.
> First question is, from where comes your data ...
>
> if from form/url:
> make sure the data are send in udf-8, use function "SetEncoding" to make
> sure of it.
>
> if from cfml template:
> make sure if template is stored in UTF-8 and if this is the only template
> stored in UTF-8,
> add <cfprocessingdirective pageEncoding="utf-8">, only if you are a 100%
> sure all your templates are stored in UTF-8, you can change the template
> charset in admin to UTF-8, but i have never seen a environment where this
> was the case.
>
> if you read from file:
> make sure the template is is stored in UTF-8, define charset="UTF-8" when
> opening the file.
>
> /micha
>
> 2012/2/22 Sean Daniels <
daniels.s...@gmail.com>