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


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 cfcontent type=text/html; charset=utf-8

and cfprocessingDirective pageencoding=utf-8

and cfset setEncoding(form,utf-8)

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

useUnicode=turecharacterEncoding=UTF-8

My query is as follows:

  cfquery datasource=ams_test

INSERT INTO tbl_questions (Q_ID, Q_Mark, Q_Text)

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

  /cfquery

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


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 cfcontent type=text/html; charset=utf-8
 and cfprocessingDirective pageencoding=utf-8
 and cfset setEncoding(form,utf-8)
 
 i have aslo added the following string to my DSN name in Coldfusion
 administrtor:
 useUnicode=turecharacterEncoding=UTF-8

   cfquery datasource=ams_test
 INSERT INTO tbl_questions (Q_ID, Q_Mark, Q_Text)
 VALUES ('#Q_ID#', '#FORM.select#', '#FORM.txt_text#')
   /cfquery

Use cfqueryparam:
cfquery datasource=ams_test
   INSERT INTO tbl_questions (Q_ID, Q_Mark, Q_Text)
   VALUES (
cfqueryparam value=#Q_ID#,
cfqueryparam value=#FORM.select#,
cfqueryparam value=#FORM.txt_text
)
/cfquery


 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


Re: CFMX/MySql Unicode problem with arabic

2006-04-22 Thread Paul Hastings
manar droubi wrote:
 useUnicode=turecharacterEncoding=UTF-8

and the above should be
useUnicode=truecharacterEncoding=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 and unicode

2002-06-13 Thread Teng-Yan Loke

Dear folks

My customer requires display of his entire site in simplified chinese.
Currently, the application is running on CF5 and is filled with CFGRID and
CFTREE code, which must display Chinese characters from the Oracle database
too.

Will CFMX satisfy my requirements completely? Thanx.


Teng-Yan Loke | [EMAIL PROTECTED] | +65-62169727
Developer | novaSPRINT Systems Pte Ltd

__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: CFMX and unicode

2002-06-13 Thread Robert Everland

How did he get CFMX to use JRE 1.4 , I tried and failed, is there anything I
have to say correctly inside of CF Administrator. Also anyone heard anything
about maybe being able to pre complie your site?

Robert Everland III
Dixon Ticonderoga
Web Developer Extraordinaire

-Original Message-
From: Marius Milosav [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 13, 2002 3:12 AM
To: CF-Talk
Subject: Re: CFMX and unicode


This is fresh from Paul Hastings the master of CF and Unicode:

i upgraded that server's jre to 1.4  wow! got non-gregorian calendars,
more
locales (hindi for instance)  fixed a whole bunch of other problems.
http://tessaban.tei.or.th/unicode/javaDates.cfm (new hindi  thai BE
calendars)

even the png/jpg cfchart formats now support thai, etc.
http://tessaban.tei.or.th/unicode/graphtest.cfm?chartFormat=jpg
http://tessaban.tei.or.th/unicode/graphtest.cfm?chartFormat=png

unfortunately flash is still busted:
http://tessaban.tei.or.th/unicode/graphtest.cfm?chartFormat=flash

i guess i'd recommend upgrading to JRE 1.4 (nothing seems broken so far)
unless mm objects (got questions to them now).

I guess you will have to try it and see if it solves your problem.

One thing that I can tell you is that CFtree has new behavior from before.
Some things you can fix, some things don't work as specified.

Marius Milosav
www.scorpiosoft.com
It's not about technology, it's about people.
Virtual Company (VICO) Application Demo
www.scorpiosoft.com/vicodemo/login.cfm


- Original Message -
From: Teng-Yan Loke [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Thursday, June 13, 2002 3:32 AM
Subject: RE: CFMX and unicode


 Dear folks

 My customer requires display of his entire site in simplified chinese.
 Currently, the application is running on CF5 and is filled with CFGRID and
 CFTREE code, which must display Chinese characters from the Oracle
database
 too.

 Will CFMX satisfy my requirements completely? Thanx.

 
 Teng-Yan Loke | [EMAIL PROTECTED] | +65-62169727
 Developer | novaSPRINT Systems Pte Ltd

 

__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: CFMX and unicode

2002-06-13 Thread Frank Mamone

I haven't done this myself but I know it would be in the Java and JVM screen
under Server Settings. You probabaly ghave to restart your CF services too.


- Original Message -
From: Robert Everland [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Thursday, June 13, 2002 9:47 AM
Subject: RE: CFMX and unicode


 How did he get CFMX to use JRE 1.4 , I tried and failed, is there anything
I
 have to say correctly inside of CF Administrator. Also anyone heard
anything
 about maybe being able to pre complie your site?

 Robert Everland III
 Dixon Ticonderoga
 Web Developer Extraordinaire

 -Original Message-
 From: Marius Milosav [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, June 13, 2002 3:12 AM
 To: CF-Talk
 Subject: Re: CFMX and unicode


 This is fresh from Paul Hastings the master of CF and Unicode:

 i upgraded that server's jre to 1.4  wow! got non-gregorian calendars,
 more
 locales (hindi for instance)  fixed a whole bunch of other problems.
 http://tessaban.tei.or.th/unicode/javaDates.cfm (new hindi  thai BE
 calendars)

 even the png/jpg cfchart formats now support thai, etc.
 http://tessaban.tei.or.th/unicode/graphtest.cfm?chartFormat=jpg
 http://tessaban.tei.or.th/unicode/graphtest.cfm?chartFormat=png

 unfortunately flash is still busted:
 http://tessaban.tei.or.th/unicode/graphtest.cfm?chartFormat=flash

 i guess i'd recommend upgrading to JRE 1.4 (nothing seems broken so far)
 unless mm objects (got questions to them now).

 I guess you will have to try it and see if it solves your problem.

 One thing that I can tell you is that CFtree has new behavior from before.
 Some things you can fix, some things don't work as specified.

 Marius Milosav
 www.scorpiosoft.com
 It's not about technology, it's about people.
 Virtual Company (VICO) Application Demo
 www.scorpiosoft.com/vicodemo/login.cfm


 - Original Message -
 From: Teng-Yan Loke [EMAIL PROTECTED]
 To: CF-Talk [EMAIL PROTECTED]
 Sent: Thursday, June 13, 2002 3:32 AM
 Subject: RE: CFMX and unicode


  Dear folks
 
  My customer requires display of his entire site in simplified chinese.
  Currently, the application is running on CF5 and is filled with CFGRID
and
  CFTREE code, which must display Chinese characters from the Oracle
 database
  too.
 
  Will CFMX satisfy my requirements completely? Thanx.
 
  
  Teng-Yan Loke | [EMAIL PROTECTED] | +65-62169727
  Developer | novaSPRINT Systems Pte Ltd
 
 

 
__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: CFMX and unicode

2002-06-13 Thread Robert Everland

I thought that too, but when I installed the SDK on my computer it just kept
saying that it wasn't a correct version of java. I tried / and \ , anyone
else out there?

-Original Message-
From: Frank Mamone [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, June 13, 2002 11:48 AM
To: CF-Talk
Subject: Re: CFMX and unicode


I haven't done this myself but I know it would be in the Java and JVM screen
under Server Settings. You probabaly ghave to restart your CF services too.


- Original Message -
From: Robert Everland [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Thursday, June 13, 2002 9:47 AM
Subject: RE: CFMX and unicode


 How did he get CFMX to use JRE 1.4 , I tried and failed, is there 
 anything
I
 have to say correctly inside of CF Administrator. Also anyone heard
anything
 about maybe being able to pre complie your site?

 Robert Everland III
 Dixon Ticonderoga
 Web Developer Extraordinaire

 -Original Message-
 From: Marius Milosav [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, June 13, 2002 3:12 AM
 To: CF-Talk
 Subject: Re: CFMX and unicode


 This is fresh from Paul Hastings the master of CF and Unicode:

 i upgraded that server's jre to 1.4  wow! got non-gregorian 
 calendars, more locales (hindi for instance)  fixed a whole bunch of 
 other problems. http://tessaban.tei.or.th/unicode/javaDates.cfm (new 
 hindi  thai BE
 calendars)

 even the png/jpg cfchart formats now support thai, etc. 
 http://tessaban.tei.or.th/unicode/graphtest.cfm?chartFormat=jpg
 http://tessaban.tei.or.th/unicode/graphtest.cfm?chartFormat=png

 unfortunately flash is still busted: 
 http://tessaban.tei.or.th/unicode/graphtest.cfm?chartFormat=flash

 i guess i'd recommend upgrading to JRE 1.4 (nothing seems broken so 
 far) unless mm objects (got questions to them now).

 I guess you will have to try it and see if it solves your problem.

 One thing that I can tell you is that CFtree has new behavior from 
 before. Some things you can fix, some things don't work as specified.

 Marius Milosav
 www.scorpiosoft.com
 It's not about technology, it's about people.
 Virtual Company (VICO) Application Demo 
 www.scorpiosoft.com/vicodemo/login.cfm


 - Original Message -
 From: Teng-Yan Loke [EMAIL PROTECTED]
 To: CF-Talk [EMAIL PROTECTED]
 Sent: Thursday, June 13, 2002 3:32 AM
 Subject: RE: CFMX and unicode


  Dear folks
 
  My customer requires display of his entire site in simplified 
  chinese. Currently, the application is running on CF5 and is filled 
  with CFGRID
and
  CFTREE code, which must display Chinese characters from the Oracle
 database
  too.
 
  Will CFMX satisfy my requirements completely? Thanx.
 
  
  Teng-Yan Loke | [EMAIL PROTECTED] | +65-62169727 Developer | 
  novaSPRINT Systems Pte Ltd
 
 

 

__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: CFMX and unicode

2002-06-07 Thread Paul Hastings

 the application has all the information translated in Korean and it
display
 perfectly (well with the exception of CFtree).

you mean in cf5?

 Tried it under CFMX and the forms display garbage.
 initially all the forms had the following at the top:

welcome to world of legacy data: cfmx wants/expects ucs-2 encoded
data. your kr data is encoded how? stored in N datatype fields?

 meta http-equiv=content-type content=text/html;charset=euc-kr
 The above works in CF5 but does not work in CFMX

cfmx wants to spit out utf-8 encoding.

 and added the following to each form
 cfprocessingdirective pageEncoding=euc-kr

this should actually work, provided the data is stored
in something neo likes. how was the data stored?

 cfprocessingdirective pageEncoding=ks_c_5601-1987

how was the data stored?

__
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: CFMX and unicode

2002-06-07 Thread Marius Milosav

Some of the initial data was stored in char, varchar. But the bulk of it
(95%) was n type from the beginning.
Since then we had updated all the fields to nchar, nvarchar
I hope that we don't have to translate everything again. We were supposed to
go live in June and delayed to July to take advantage of CFMX Unicode
features.

Is there a fix to the problem
Thanks
Marius

- Original Message -
From: Paul Hastings [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Friday, June 07, 2002 3:53 AM
Subject: Re: CFMX and unicode


  the application has all the information translated in Korean and it
 display
  perfectly (well with the exception of CFtree).

 you mean in cf5?

  Tried it under CFMX and the forms display garbage.
  initially all the forms had the following at the top:

 welcome to world of legacy data: cfmx wants/expects ucs-2 encoded
 data. your kr data is encoded how? stored in N datatype fields?

  meta http-equiv=content-type content=text/html;charset=euc-kr
  The above works in CF5 but does not work in CFMX

 cfmx wants to spit out utf-8 encoding.

  and added the following to each form
  cfprocessingdirective pageEncoding=euc-kr

 this should actually work, provided the data is stored
 in something neo likes. how was the data stored?

  cfprocessingdirective pageEncoding=ks_c_5601-1987

 how was the data stored?

 
__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: CFMX and unicode

2002-06-07 Thread Paul Hastings

 Some of the initial data was stored in char, varchar. But the bulk of it

and the encoding?

 go live in June and delayed to July to take advantage of CFMX Unicode
 features.

i can assure you that neo  unicode's a very good choice, 
neo  unicode: go anyplace, do anything. remember you heard
that here first ;-)
 
 Is there a fix to the problem

probably. anyway i can get a look at the data/templates? or failing that
try cfhttp from neo to that cf5 box. stuff that into another db using N
datatypes and N' hint for sql server (make sure its going in as unicode,
ucs-2, rather than whatever kr locale's on those boxes).



__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: CFMX and unicode

2002-06-07 Thread Marius Milosav

The original translation was on an English server with the default
installation:
Language: English,
Code Page CP 1252

So the data that was saved in the database even in nchar (nvarchar) type
fields cannot be properly interpreted by CFMX?

I know that Unicode is the way to go, but I didn't expected to have this
type of problems.

Anyway, your chapters on Internationalization in the Advanced CF5 book are
very good and I recommend it to anybody doing work for multiple locales. Do
you have something similar for CFMX in the works?

Do you want to see the site in Korean or the cfcode?

Thanks
Marius

- Original Message -
From: Paul Hastings [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Friday, June 07, 2002 8:25 AM
Subject: Re: CFMX and unicode


  Some of the initial data was stored in char, varchar. But the bulk of it

 and the encoding?

  go live in June and delayed to July to take advantage of CFMX Unicode
  features.

 i can assure you that neo  unicode's a very good choice,
 neo  unicode: go anyplace, do anything. remember you heard
 that here first ;-)

  Is there a fix to the problem

 probably. anyway i can get a look at the data/templates? or failing that
 try cfhttp from neo to that cf5 box. stuff that into another db using N
 datatypes and N' hint for sql server (make sure its going in as unicode,
 ucs-2, rather than whatever kr locale's on those boxes).



 
__
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: CFMX and unicode

2002-06-07 Thread Paul Hastings

 The original translation was on an English server with the default
 installation:  Language: English, Code Page CP 1252

and there's your problem. though w/sql server 2k you can actually
set collations per db, per table, even per column. if you go more
m17n then unicode. if you're only going to do korean  english
i guess you can figure out something as is.

 So the data that was saved in the database even in nchar (nvarchar) type
 fields cannot be properly interpreted by CFMX?

well neo's expecting ucs-2 for unicode data ala java  sql server. if
you have something else you have a small problem. i guess this is
going to be common enough to look at some solutions.

 I know that Unicode is the way to go, but I didn't expected to have this
 type of problems.

i actually had more problems with neo  single locales than w/neo 
unicode. after all my years of whining, i actually got a bit too much
unicoderesistance IS futile ;-)

 Anyway, your chapters on Internationalization in the Advanced CF5 book are

thanks.

 very good and I recommend it to anybody doing work for multiple locales.
Do
 you have something similar for CFMX in the works?

i think so.


__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



CFMX and unicode

2002-06-06 Thread Marius Milosav

Background:
CF5 Server, Win 2000k Server, MS-SQL2000

the application has all the information translated in Korean and it display
perfectly (well with the exception of CFtree).

Tried it under CFMX and the forms display garbage.
initially all the forms had the following at the top:
meta http-equiv=content-type content=text/html;charset=euc-kr
The above works in CF5 but does not work in CFMX

I have tried the following in CFMX with no success:
added the following to the Application.cfm
cfcontent type=text/html; charset=euc-kr
cfset setEncoding(URL, euc-kr)
cfset setEncoding(FORM, euc-kr)

then replaced it with
cfcontent type=text/html; charset=ks_c_5601-1987
cfset setEncoding(URL, ks_c_5601-1987)
cfset setEncoding(FORM, ks_c_5601-1987)

and added the following to each form

cfprocessingdirective pageEncoding=euc-kr

or
cfprocessingdirective pageEncoding=ks_c_5601-1987

without any success.

Probably I am missing something very simple but I can figure out what.

thank you
Marius Milosav
www.scorpiosoft.com
It's not about technology, it's about people.
Virtual Company (VICO) Application Demo
www.scorpiosoft.com/vicodemo/login.cfm

__
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists