House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

UTF-8 and MySQL

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Fixed already
Andy Jarrett
10/21/04 03:59 A
Andy Jarrett wrote:
Paul Hastings
10/21/04 11:27 A
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Andy Jarrett
10/21/2004 03:52 AM

Hi there, I'm pretty sure this is me being naive. But i am running MySQL 4.1.6 and have create a MyIsam table with a UTF-8 character set. UPDATE cc_languages2 lang_coutry = 'Ελλάδα' WHERE langId = 2 When i run the above code in a <cftry> block i get the following error returned 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 '= 'Î"λλάδα' WHERE langId = 2 Do i need to convert the text i am updating before i run the SQL (by the way it says Greece in Greek)?? Cheers Andy www.andyjarrett.co.uk

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Andy Jarrett
10/21/2004 03:59 AM

Fixed already bad, SQL statement, i was too concerned thinking it was a UTF-8 problem. Andy On Thu, 21 Oct 2004 08:49:30 +0100, Andy Jarrett <andy.jarrett@gmail.com> wrote: ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Andy Jarrett
10/21/2004 04:53 AM

Ok, im stuck again with this whole UTF-8 problem. This time outputting the results. Below is my complete page that i am testing <cfprocessingdirective pageencoding="utf-8"> <cfcontent type="text/html; charset=utf-8"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">; <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head>   <title></title>   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body>   <cfquery datasource="#dsn#" name="q">     SELECT * FROM cc_languages     WHERE langId = '2'   </cfquery>   <cfoutput>     #q.lang_country#   </cfoutput> </cftry> </body> </html> This should simply out Ελλάδα, but its not i am getting junk. I am running MySQL 4.1.6, on CFMX 6.1, windowsXP pro Cheers Andy On Thu, 21 Oct 2004 08:57:20 +0100, Andy Jarrett <andy.jarrett@gmail.com> wrote: ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Paul Hastings
10/21/2004 11:27 AM

Andy Jarrett wrote: first off not really sure mysql supports unicode/utf-8 at all. > <cfprocessingdirective pageencoding="utf-8"> > <cfcontent type="text/html; charset=utf-8"> good. > <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> not good if the page is in greek. > <head> >   <title></title> >   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> waste of time for mx but useful for brain dead spiders, etc. > This should simply out Ελλάδα, but its not i am getting junk. did you remember to add something like "UseUnicode=true&characterEncoding=UTF-8" to that dsn?

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Andy Jarrett
10/22/2004 03:20 AM

The connection string worked a treat, cheer Paul On Thu, 21 Oct 2004 22:24:24 +0700, Paul Hastings <paul@sustainablegis.com> wrote: ----- Excess quoted text cut - see Original Post for more -----


<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

May 24, 2012

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
     1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31     

Designer, Developer and mobile workflow conference