I've got a website panel (it's set default to work with UTF8 characters) that allows me to import Excel data into MySQL database. The sheets often contain, for instance, Polish letters (ś, ę, ó, Ź, ł, Ż et cetera). Although in database I can see, for instance FABRYKA URZÄ„DZEŃ PRZEMYSÅOWYCH, the panel displays the characters properly, here it's FABRYKA URZĄDZEŃ PRZEMYSŁOWYCH.
Now, when I'm trying to display the very same data with my Delphi application, the data are fetched raw. No matter what settings I apply in TMyConnection, I can only see FABRYKA URZÄ„DZEŃ PRZEMYSÅOWYCH.
Has anybody got any idea on how to fix this?
Thank you in advance!
Encoding issues
Re: Encoding issues
To solve the issue, please try to set the TMyConnection.Options.UseUnicode property to True. For example:
Code: Select all
MyConnection.Options.UseUnicode := True;
Re: Encoding issues
Unfortunately, this doesn't work. What's worse, these characters, when processed through TMyQuery are inserted raw, that is instead of an encoded character that PHP page can retrieve from the database and display properly, the data inserted is uncoded ("ś" in the database, ? marks on my website).
Re: Encoding issues
Most likely the issue is due to characters displaying on your PHP page, but not MyDAC. Please check in what coding characters are stored in the MySQL server database. For this you can use dbForge Studio for MySQL: https://www.devart.com/dbforge/mysql/studio