Thought you lot might find this useful, as this topic
does popup every so often.
courtesy of Todd rafferty from the cfguru
list
For those of you
looking for answers to your half-assed localization projects, here's one for
ya...
#1.) This is needed (thanks Sean for pointing out the docs)
<!--- // UTF-8 Encoding --->
<cfset setEncoding("URL", "UTF-8") />
<cfset setEncoding("Form", "UTF-8") />
<!--- Set the output encoding to UTF-8 --->
<cfcontent type="text/html; charset=UTF-8" /> (or <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> )
#2.) Open up the table in question in SQL Server, go to design view and each column that is going to have other languages have to be nvarchar or ntext and 'Collation' for that column (at the bottom of design view) must be set to be the appropriate language.
#3.) SQL Server statements most be modified to look like:
insert into test(mytest)
values (N'#theValue#');
It's a really stupid thing, but notice the mysterious "N" before the value in the sql statement? yeah, that has to be there. Means I have to go back and modify all insert / update statements, select statements don't need them for some reason. Shouldn't take me too long, but it was crap I didn't want to have to do. Such is life.
#1.) This is needed (thanks Sean for pointing out the docs)
<!--- // UTF-8 Encoding --->
<cfset setEncoding("URL", "UTF-8") />
<cfset setEncoding("Form", "UTF-8") />
<!--- Set the output encoding to UTF-8 --->
<cfcontent type="text/html; charset=UTF-8" /> (or <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> )
#2.) Open up the table in question in SQL Server, go to design view and each column that is going to have other languages have to be nvarchar or ntext and 'Collation' for that column (at the bottom of design view) must be set to be the appropriate language.
#3.) SQL Server statements most be modified to look like:
insert into test(mytest)
values (N'#theValue#');
It's a really stupid thing, but notice the mysterious "N" before the value in the sql statement? yeah, that has to be there. Means I have to go back and modify all insert / update statements, select statements don't need them for some reason. Shouldn't take me too long, but it was crap I didn't want to have to do. Such is life.
Russ
Michaels
Macromedia/Allaire Certified
ColdFusion Developer
CFDeveloper
The free resource and community for
ColdFusion developer.
Join the CFDeveloper discussion lists.
To subscribe send an e-mail to [EMAIL PROTECTED]
