List:MySQL++« Previous MessageNext Message »
From:gani b. c. Date:October 3 2006 7:09am
Subject:Re: mysqlpp and wchar_t problem
View as plain text  
thx for reply.
the code works perfectly.
let me attach the code for everyone that maybe need it.

    wchar_t *    wtest = L"ㄎㄎㄍㄊㄐㄍ";
    char buf[1024];

    WideCharToMultiByte( CP_UTF8, 0, wtest, -1, buf, 1024, 0, 0 );

    query << "INSERT INTO tt VALUES( '" << buf << "')";

thanks again Warren.

On 10/3/06, Warren Young <mysqlpp@stripped> wrote:
> gani b. c. wrote:
> > 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.
> Read the MySQL++ user manual chapter on Unicode:
> Short version: by using wchar_t you are going to be using a UCS-2,
> UCS-4, UTF-16, or UTF-32 character encoding.  (Which it is depends on
> your OS, compiler, etc.)  MySQL wants UTF-8, a wholly different deal.
> --
> MySQL++ Mailing List
> For list archives:
> To unsubscribe:
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