• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

japan text, ColdFusion and MySQL

New Here ,
May 22, 2006 May 22, 2006

Copy link to clipboard

Copied

I have a script , running under ColdFusion 6,1,0,63958. and MySQL as Database Engine

<cfprocessingDirective pageencoding="utf-8">
<cfset setEncoding("form","utf-8")>

<cfcontent type="text/html; charset=UTF-8">

<CFIF IsDefined("code")>

<cfquery datasource="db" name="InsSQL">
Insert into test_unicode SET mem='#code#'
</cfquery>

<cfquery datasource="db" name="SelSQL">
SELECT * FROM test_unicode
</cfquery>

<CFOUTPUT query="SelSQL">
#ID#, #mem#<br>
</CFOUTPUT>

</CFIF>

<FORM name=ddd action="" method=post>

<textarea name=code rows=10 cols=20></textarea>
<input type=submit>
</FORM>



But when i try to submit Japan characters it returns :

Error Executing Database Query.
[Macromedia][SequeLink JDBC Driver][ODBC Socket][MySQL][ODBC 3.51 Driver][mysqld-4.0.26-standard]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 ''„' at line 2

The error occurred in C:\...\unicode\index.cfm: line 10

8 : <cfquery datasource="db" name="InsSQL">
9 : Insert into test_unicode
10 : SET mem='#code#'
11 : </cfquery>
12 :


--------------------------------------------------------------------------------

SQL Insert into test_unicode SET mem='的最 臨的最'
DATASOURCE db
VENDORERRORCODE 1064
SQLSTATE 42000

Please try the following:
Check the ColdFusion documentation to verify that you are using the correct syntax.
Search the Knowledge Base to find a solution to your problem.

HELP ME PLEASE , WHY ??? HOW find a solution ?
TOPICS
Advanced techniques

Views

542

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 22, 2006 May 22, 2006

Copy link to clipboard

Copied

ProgmanMX wrote:

> Error Executing Database Query.
> [Macromedia][SequeLink JDBC Driver][ODBC Socket][MySQL][ODBC 3.51
> Driver][mysqld-4.0.26-standard]You have an error in your SQL syntax. Check the

well first off don't use ODBC, use the JDBC driver (probably should get the
latest from mysql & config it as "other" in the dsn section of cfadmin). second,
*is* the version of mysql that you're running unicode capable? third, did you
set the database encoding to unicode/utf-8?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 23, 2006 May 23, 2006

Copy link to clipboard

Copied

Yes, it seems MySQL unicode capable ... cause i will try to implement same script by PHP (on the same table, same DB), and it performs great !

Maybe ane other advice ? Maybe i can in someway ron PhP script from CF to perform this mechanism ? ANY solution required !
thanks in advance !

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 23, 2006 May 23, 2006

Copy link to clipboard

Copied

LATEST
But i have only control panel with only ODBC access ...

please , if i will ask hosting provider, how i can explain him about prooer JDBC settings ?

Thanks in advance !

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation