Re: How to use UTF16 with .net
Posted by: freefly pan
Date: May 14, 2013 04:08AM

I use utf8mb4 in .net, It`s work.

but a problem in ODBC.

I create a table with charset utf8mb4:
CREATE TABLE sakila.test(ID INT NOT NULL AUTO_INCREMENT,Name VARCHAR(512),KEY(ID))CHARSET=utf8mb4;

then I creat ODBC DSN with MySQL ODBC 5.2w Driver named "EDB" and set character set utf8mb4 in details.

now, in my project, I try to insert a word use MFC:

CString strSql = _T("insert into test(name) values('𢈢')");
CDatabase db;
db.Open(_T("EDB"));
db.ExecuteSQL(strSql);//error, no respond
db.Close();

If the values is character in 0x0000-0xffff, it`s work.

How to use UTF8mb4 with ODBC.

Options: ReplyQuote


Subject
Written By
Posted
Re: How to use UTF16 with .net
May 14, 2013 04:08AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.