Home » U++ Library support » U++ SQL » Sticky problem : MySql and UTF8
Re: Sticky problem : MySql and UTF8 [message #35255 is a reply to message #35224] |
Thu, 26 January 2012 10:01 |
|
mirek
Messages: 13980 Registered: November 2005
|
Ultimate Member |
|
|
BioBytes wrote on Mon, 23 January 2012 16:37 | Right way to solve the accentuated issue with MySql and UTF8 is to add the following code after getting the connection:
mysql_set_character_set(MySession,"utf8");
Operations of insertion must be done as follows:
String str = ToCharset(CHARSET_UTF8,AsString(~MyEditString),GetDefaultCha rset(),'?');
SQL &Insert(MYTABLE)(NAME,str)(NUM,MyEditInt.GetData());
Operations of deletion must ne done as follows:
SQL &Delete(MYTABLE).Where(NAME==ToCharset CHARSET_UTF8,~MyEditString,GetDefaultCharset(),'?'));
I will try to post a code snippet to explain in details how to proceed with MySql and UTF8 encoded tables.
Hoping this will be helpful for someones
Biobytes
|
Thanks, I will try to integrate this into MySql session.
Mirek
|
|
|
Goto Forum:
Current Time: Tue May 14 16:37:30 CEST 2024
Total time taken to generate the page: 0.03558 seconds
|