List:MySQL++« Previous MessageNext Message »
From:gani b. c. Date:October 2 2006 8:11am
Subject:mysqlpp and wchar_t problem
View as plain text  
hi..
i have a problem using Query class from mysqlpp with wchar_t. i hope
somebody can help me with this.
i want to insert unicode to table.

here is the sample 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.

Thread
mysqlpp and wchar_t problemgani b. c.2 Oct
  • Re: mysqlpp and wchar_t problemWarren Young2 Oct
    • mysql++ memory usageAlex Burton3 Oct
      • Re: mysql++ memory usageWarren Young4 Oct
      • Re: mysql++ memory usageBill K4 Oct
        • Re: mysql++ memory usageAlex Burton4 Oct
        • Re: mysql++ memory usageWarren Young4 Oct
          • Re: mysql++ memory usageBill K5 Oct
            • Re: mysql++ memory usageWarren Young5 Oct
              • Re: mysql++ memory usageAlex Burton6 Oct
                • Re: mysql++ memory usageAlex Burton6 Oct
                  • RE: mysql++ memory usageMatt Dargavel6 Oct
                    • Re: mysql++ memory usageWarren Young6 Oct
                      • Re: mysql++ memory usageAlex Burton7 Oct
                        • Re: mysql++ memory usageWarren Young7 Oct
                        • Re: mysql++ memory usageMatt Dargavel7 Oct
                          • Re: mysql++ memory usageWarren Young12 Oct
                            • Exporting classesMatt Dargavel19 Oct
                              • Re: Exporting classesWarren Young20 Oct
                                • RE: Exporting classesMatt Dargavel20 Oct
      • Re: mysql++ memory usageCarlos Flores4 Oct
    • Re: mysqlpp and wchar_t problemgani b. c.3 Oct