Copy link to clipboard
Copied
I'm trying to insert Arabic character from coldfuin 7 into mysql 4.1 DB the DB collation is utf8_unicode-ci
The form is in utf-8 enicoding.
When I use the php mysql admin and try to inset Arabic it works fine but when I use coldfusion I get ??????????
Any idea?
Thank you
assuming that the db is correctly setup for unicode and that you're using JDBC
driver (not ODBC) then:
add
useUnicode=true&characterEncoding=utf8
to the connection string box (not exactly sure what is was called in cf7) found
in teh advanced menu for that DSN.
Copy link to clipboard
Copied
assuming that the db is correctly setup for unicode and that you're using JDBC
driver (not ODBC) then:
add
useUnicode=true&characterEncoding=utf8
to the connection string box (not exactly sure what is was called in cf7) found
in teh advanced menu for that DSN.
Copy link to clipboard
Copied
is it possible to add connection string to CF code rather than CF admin? I moved to a new hosting company hostek and the helm does not support advanced options when setting CF DSN.
Thank you,
Copy link to clipboard
Copied
Not easily, no. Just drop your provider's support bods a line, and ask them to add it!
--
Adam
Copy link to clipboard
Copied
and since email replies won't work with the "<>" chars in them:
in application.cfm
<cfset setEncoding("url","UTF-8")>
<cfset setEncoding("form","UTF-8")>
<cfcontent type="text/html; charset=UTF-8">
at the top of your cf pages add:
<cfprocessingdirective pageEncoding="UTF-8">
Copy link to clipboard
Copied
Hello, I have a similar problem but i am using a java application. And also the arabic text in Mysql and in java application is readable, but i can only write arabic text in mysql. if i update the fields and write arabic text from the java application it changes into ???? even in the original database. can anyone help me with this.
Copy link to clipboard
Copied
And did you to all the things suggested in this thread? After doing that, did you still have problems?
--
Adam
Copy link to clipboard
Copied
Yes i did. I have made the encoding of the database to utf 8 , and everything is ok in the database, but in the java application i can only view arabic data but not write.
Copy link to clipboard
Copied
OK, so you're passing the useUnicode thing in the JDBC string for your CF data source. Are you doing the same thing when you make your JDBC connection with Java?
It's probably more sensible to ask Java-specific questions on a Java forum, btw. This is a CF forum, and few CF developers have this sort of exposure to Java.
--
Adam