all groups > coldfusion flash integration > october 2007 >
You're in the

coldfusion flash integration

group:

problem with polish letters passing to database


problem with polish letters passing to database farmazone
10/9/2007 3:32:34 PM
coldfusion flash integration: hi.

I have problem with polish letters like '?????????' passing from flex to CF
script writing them to database . All I get is a string like "??????".

My database charset is UTF-8 and collation of tables is also utf-8
(utf8_general_ci ).everything is utf-8. Variables passed from flex and returned
back from CF script are fine.

Previously I used to work with php and amfphp and there were no problems with
encoding and database. I'm not newbie to flash and flex.

I work on MacPro Intel.

strange issue..
Re: problem with polish letters passing to database PaulH **AdobeCommunityExpert**
10/9/2007 11:05:38 PM
[quoted text, click to view]

can you verify that they end up in cf correctly? just have cf write the text to
a file.

if you're sure the issue is on the cf end of things, what db? what db driver are
Re: problem with polish letters passing to database farmazone
10/10/2007 12:00:00 AM
I use MySQL 5.0.41 .

They end up correctly for sure. I put :
<cffile charset="utf-8" output = "#str#" action = "write" file =
"#ExpandPath('./')#foo.txt" attributes = normal >

and it writes the correct string (after I added charset="utf-8" attributes) so
it is OK.

here goes whole function
<cffunction name="update" access="remote" returntype="any">
<cfargument name="str" type="string" required="yes">

<cffile charset="utf-8" output = "#str#" action = "write" file =
"#ExpandPath('./')#foo.txt" attributes = normal >

<cfquery name="flashQuery" datasource="#This.datasource#"
username="#This.username#" password="#This.password#">
UPDATE miasto_texts SET
text_pl="#str#"

WHERE id="21"
</cfquery>
<cfreturn true>
</cffunction>
Re: problem with polish letters passing to database PaulH **AdobeCommunityExpert**
10/10/2007 12:00:00 AM
[quoted text, click to view]

what db driver? make sure it's the JDBC one not ODBC. have you added
"useUnicode=true&characterEncoding=utf8" to the url for the mysql dsn?

[quoted text, click to view]

this looks ok except that i'd recommend using cfqueryparam & i'm not a big fan
Re: problem with polish letters passing to database farmazone
10/10/2007 12:00:00 AM
oh. thank you.

it's working when I added 'useUnicode=true&characterEncoding=utf8'. but I did
it via CF Administrator Page and on my remote server I have no access to this
setting I think. Is there another way?
Re: problem with polish letters passing to database PaulH **AdobeCommunityExpert**
10/10/2007 12:00:00 AM
[quoted text, click to view]

not that i know of, just tell your host you need this.
AddThis Social Bookmark Button