MySQL WebApp, my system Windows 10

I am very determined to solve all problems.
I installed a new version of MySQL community. I created a new utf8 database following the directions in
I can’t read polish characters :frowning:
I expect ĄąĆćĘę and the program reads ??? characters cannot be recognized.

MySQL Workbench:
MySQL Table
Debug Xojo:

I have several programs written in Lazaru and Microsoft Visual Studio VB.NET and C# in PHP and Elevate Web Builder. Polish characters are well read everywhere.
I am asking for help. I would like to start my adventure with Xojo.

How are you putting the data into the database in the first place. If you are importing files that are not encoded in UTF8 then it will not magically become UTF8 by storing it into the database.

If it is data collected over many years then you may have some records that are in UTF8 and others that are in a differing encoding. That is typically very problematic and would likely need a record by record manual inspection to test.

When you read data from the database, Xojo does not automatically assign an encoding to it, regardless of how you have defined the database. Therefore, the encoding will be Nil. You must assign an encoding to the string with DefineEncoding.

I installed a new MySQL community server and created a new database. I set the encoding to utf8 and added one record.
I entered the data in MySQL Workbench 8.0 CE

I see 6 bytes, that means you did not insert UTF8, maybe ISO Latin?

You said MySQL and was pointing to a MSSQL thread.

Maybe you still need proper settings in your DB Tables?

Something like:

SET NAMES utf8mb4;

CREATE TABLE `mytable`  (
  `rowid` bigint(20) NOT NULL AUTO_INCREMENT,
  `mytxt` varchar(80) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,


) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

1 Like
SET NAMES utf8mb4;

This needs to be done at the start of every session, including the ones sending the data to the database. Without it you are using a different encoding to send the commands.

1 Like

Everything works, thank you.
Old tables work too :slight_smile:

1 Like