| 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 << "')";
query.execute();
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:
>
> http://tangentsoft.net/mysql++/doc/userman/html/unicode.html
>
> 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: http://lists.mysql.com/plusplus
> To unsubscribe: http://lists.mysql.com/plusplus?unsub=ganibc@stripped
>
>
| Thread | ||
|---|---|---|
| • mysqlpp and wchar_t problem | gani b. c. | 2 Oct |
| • Re: mysqlpp and wchar_t problem | Warren Young | 2 Oct |
| • mysql++ memory usage | Alex Burton | 3 Oct |
| • Re: mysql++ memory usage | Warren Young | 4 Oct |
| • Re: mysql++ memory usage | Bill K | 4 Oct |
| • Re: mysql++ memory usage | Alex Burton | 4 Oct |
| • Re: mysql++ memory usage | Warren Young | 4 Oct |
| • Re: mysql++ memory usage | Bill K | 5 Oct |
| • Re: mysql++ memory usage | Warren Young | 5 Oct |
| • Re: mysql++ memory usage | Alex Burton | 6 Oct |
| • Re: mysql++ memory usage | Alex Burton | 6 Oct |
| • RE: mysql++ memory usage | Matt Dargavel | 6 Oct |
| • Re: mysql++ memory usage | Warren Young | 6 Oct |
| • Re: mysql++ memory usage | Alex Burton | 7 Oct |
| • Re: mysql++ memory usage | Warren Young | 7 Oct |
| • Re: mysql++ memory usage | Matt Dargavel | 7 Oct |
| • Re: mysql++ memory usage | Warren Young | 12 Oct |
| • Exporting classes | Matt Dargavel | 19 Oct |
| • Re: Exporting classes | Warren Young | 20 Oct |
| • RE: Exporting classes | Matt Dargavel | 20 Oct |
| • Re: mysql++ memory usage | Carlos Flores | 4 Oct |
| • Re: mysqlpp and wchar_t problem | gani b. c. | 3 Oct |
