Page 1 of 1

Encoding issues

Posted: Sun 30 Oct 2016 13:50
by Yuusatsu
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!

Re: Encoding issues

Posted: Mon 31 Oct 2016 09:03
by ViktorV
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

Posted: Mon 07 Nov 2016 12:17
by Yuusatsu
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

Posted: Thu 10 Nov 2016 14:01
by ViktorV
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