MySQL 5.032
Delphi 7
MyDac 4.30.0.10
the character set of mysql server ist utf8, tables and database the same. I switched my Delphi application to utf8 using set names:
MyConnection1.ExecSQL('set names utf8;',[]);
but the German special characters don't show correct and if I try to save a string to the database it gets deleted completely.
what did I do wrong?
Thank you for your help in advance!
Ulf
Character Set MySQL "set names"
Sorry, Didn't solve the problem
Thank you for your answer.
I also tried to set TMyConnection.Options.Charset to utf8 but I had the same problem, the special characters are not shown correctly.
I also tried to set TMyConnection.Options.Charset to utf8 but I had the same problem, the special characters are not shown correctly.
If you use the utf8 character set, you should use DB-aware controls that support utf8 as well, but there are few of such controls on the market.
If you want to work with Unicode, you should set the UseUnicode option of TMyConnection to True, and use DB-aware controls with Unicode support (like TNT controls).
If you want your application to be able to display Latin and German-specific characters only, you should just specify the corresponding character set name in TMyConnection.Options.Charset, and correctly setup Language for non-Unicode programs in your system (see Control Panel -> Regional and Language Options -> Advanced).
If you want to work with Unicode, you should set the UseUnicode option of TMyConnection to True, and use DB-aware controls with Unicode support (like TNT controls).
If you want your application to be able to display Latin and German-specific characters only, you should just specify the corresponding character set name in TMyConnection.Options.Charset, and correctly setup Language for non-Unicode programs in your system (see Control Panel -> Regional and Language Options -> Advanced).