UNICODE in mysql error
Posted by: vis good in mysql someday
Date: June 05, 2011 03:05AM

"INSERT INTO User "
"(UnicodeName,...) VALUES ( "+'UUUUU'+"....)";

UnicodeName is an unique field.
here 'UUUUU' stands for 5 unicode characters (10 bytes) - because I can not display uncode characters on the forum.

if 'UUUUU' doesn't exist in table User, the SQL is successfully executed.

my problem is:
if 'UUUUU' exists already,
const char*p=::mysql_error(pmy_Init); //pmy_init is a pointer to st_mysql)
returns error:

Duplicate entry 'MQ9?' for key 'UnicodeName'.

meaning of the error string is clear, but 'MQ9?' is not 'UUUUU' -- I guess the error string mixes with english and unicode characters, problem is that function mysql_error(...) doesn't catch error in unicode, so, the error string on unicode part is displayed incorrectly.

How to get an unicode error string to indicate 'UUUUU' correctly?

(OS: Windows, using MFC)

Options: ReplyQuote


Subject
Views
Written By
Posted
UNICODE in mysql error
1683
June 05, 2011 03:05AM


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.