Re: CFMX/MySql Unicode problem with arabic

2006-04-24 Thread Manar Droubi
thanks it worked :)

but i had a problem with the MYSQl DSN

i had to install MySQL Connector/J 3.0.17 ( only this version has worked with 
me)

thank you 

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238531
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: CFMX/MySql Unicode problem with arabic

2006-04-22 Thread Paul Hastings
manar droubi wrote:
> useUnicode=ture&characterEncoding=UTF-8

and the above should be
useUnicode=true&characterEncoding=UTF-8


~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238471
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: CFMX/MySql Unicode problem with arabic

2006-04-22 Thread Jochem van Dieten
manar droubi wrote:
> 
> i'm using Apache, MySql 4.0.24-nt, Coldfusion MX 6.1, on Windows XP Pro sp2

You should use MySQL 4.1 or newer when you work with Unicode.


> i used 
> and 
> and 
> 
> i have aslo added the following string to my DSN name in Coldfusion
> administrtor:
> useUnicode=ture&characterEncoding=UTF-8

>   
> INSERT INTO tbl_questions (Q_ID, Q_Mark, Q_Text)
> VALUES ('#Q_ID#', '#FORM.select#', '#FORM.txt_text#')
>   

Use cfqueryparam:

   INSERT INTO tbl_questions (Q_ID, Q_Mark, Q_Text)
   VALUES (
,
,

)



> Syntax error or access violation: You have an error in your SQL syntax.
> Check the manual that corresponds to your MySQL server version for the right
> syntax to use near '1 'D/1H(J')' at line 2
> 
> although it is generating a correct sql statement:
> 
> SQLINSERT INTO tbl_questions (Q_ID, Q_Mark, Q_Text) VALUES
> ('C0260AA0-A481-DF60-26BA5C0DEFEDF160', '1', 'منار الدروبي')

Some Arabic UTF-8 characters are represented by a bytestring that 
contains a '. IIRC that will work when you use cfqueryparam and 
MySQL 4.1.

Jochem

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238468
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


CFMX/MySql Unicode problem with arabic

2006-04-22 Thread manar droubi
i have a problem with inserting Arabic data into my database

i'm using Apache, MySql 4.0.24-nt, Coldfusion MX 6.1, on Windows XP Pro sp2

i did everything to enforce my application to use the UTF-8 charset

i used 

and 

and 

i have aslo added the following string to my DSN name in Coldfusion
administrtor:

useUnicode=ture&characterEncoding=UTF-8

My query is as follows:

  

INSERT INTO tbl_questions (Q_ID, Q_Mark, Q_Text)

VALUES ('#Q_ID#', '#FORM.select#', '#FORM.txt_text#')

  

it's wokring fine with english data, but when i use my name in arabic it
gives me the following error:

Syntax error or access violation: You have an error in your SQL syntax.
Check the manual that corresponds to your MySQL server version for the right
syntax to use near '1 'D/1H(J')' at line 2

although it is generating a correct sql statement:

SQLINSERT INTO tbl_questions (Q_ID, Q_Mark, Q_Text) VALUES
('C0260AA0-A481-DF60-26BA5C0DEFEDF160', '1', 'åæÇÑ ÇäÏÑèÈê')

DATASOURCE   ams_test

VENDORERRORCODE   1064

SQLSTATE   42000

as you can see my name (åæÇÑ ÇäÏÑèÈê) has been magically converted to '1
'D/1H(J')'

any suggestions?
--
manar droubi


~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238466
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54