If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > mysqlpp and wchar_t problem

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-28-06, 06:03
gani gani is offline
Registered User
 
Join Date: Sep 2006
Posts: 2
mysqlpp and wchar_t problem

hi..
i have a problem using Query class from mysqlpp with wchar_t.
i want to insert unicode.
Code:
	mysqlpp::Connection con( "test", "localhost",  "test", "" );
	mysqlpp::Query query = con.query();
	char *		test = "abcdefghij";
	wchar_t *	wtest = L"abcdefghij";

	query << "INSERT INTO tes VALUES( '" << test << "')";
	query.execute();

	query << "INSERT INTO tes VALUES( '" << wtest << "')";
	query.execute();
the char test will gave the right result, 'abcdefghij' inserted to db.
but the wchar_t wtest not give the right result, the record filled with '004A00F4'.
it seems Query not welcome unicode.
so how can I insert unicode using mysqlpp??

thx.
Reply With Quote
  #2 (permalink)  
Old 10-03-06, 06:40
gani gani is offline
Registered User
 
Join Date: Sep 2006
Posts: 2
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On