Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2006
    Posts
    2

    Unanswered: 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.

  2. #2
    Join Date
    Sep 2006
    Posts
    2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •