|
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
UTF-8 and MySQL
Hi there, I'm pretty sure this is me being naive. But i am runningAndy Jarrett 10/21/04 03:52 A Fixed alreadyAndy Jarrett 10/21/04 03:59 A Ok, im stuck again with this whole UTF-8 problem. This time outputtingAndy Jarrett 10/21/04 04:53 A Andy Jarrett wrote:Paul Hastings 10/21/04 11:27 A The connection string worked a treat, cheer PaulAndy Jarrett 10/22/04 03:20 A
Author: Andy Jarrett
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
Author: Andy Jarrett
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:
Author: Andy Jarrett
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:
Author: Paul Hastings
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?
Author: Andy Jarrett
The connection string worked a treat, cheer Paul On Thu, 21 Oct 2004 22:24:24 +0700, Paul Hastings <paul@sustainablegis.com> wrote:
|
Mailing Lists
|
Latest Fusion Authority Articles
|
||||||