Re: Problem using Mysql++ query with utf8
Posted by:
Joy Zhang
Date: January 21, 2009 08:44PM
I have solved my problem: set the default character set to be 'utf8' solves the problem.
mysqlpp::Query query = conn.query();
query<<"SET NAMES 'utf8'";
query.execute();
query<<"insert into chinese_english (UserName) values ('Nürnberger')";
query.execute();
Or one can set the default character set to be 'utf8' for the mysql server to avoid setting the character set before each query
Subject
Views
Written By
Posted
8045
January 21, 2009 04:42PM
Re: Problem using Mysql++ query with utf8
6642
January 21, 2009 08:44PM
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.