SET NAMES utf8 and ODBC Connection String
Posted by: Craig Stevens
Date: July 31, 2007 10:42AM

Hi, I'm working with a classic ASP site to a MySQL 5.0 database and converting it all to use utf8 for multilingual purposes.

I've installed the ODBC 3.51.17 driver and the connection string is: "Driver={MySQL ODBC 3.51 Driver}; Server=localhost; Port=3306; UID=someID; PWD=somePW; charset=utf8; OPTION=3; Database=someDB"

Between the CMS pages and MySQL QueryBrowser all appears to be ok entering and reading back extended characters like ø and å but ONLY if I issue a SET NAMES utf8 instruction before each database connection, i.e. objConn.Execute "SET NAMES utf8".

Is this right? I thought you didn't need to do this with this version of the driver. Have I got something wrong in the connection string (capitalisation, syntax, etc.)? I'm a newbie to MySQL, so I've been scratting around trying to piece all this together under pressure, please help if you can.

Best regards,

Craig

Options: ReplyQuote


Subject
Views
Written By
Posted
SET NAMES utf8 and ODBC Connection String
11247
July 31, 2007 10:42AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.