0

I' m trying to host a testing app (.NET 5.0 Blazor Server-Side) to a greek hosting company but I'm dealing with an encoding problem of my data in their MYSQL database.

More specifically, my app consists of a form for the user to insert data which are saved in the hosting company's database and a table which reads these data and displays them. The problem is the following:

If I inserted directly to the database (through phpmyadmin and not through UI) strings with greek characters, they would be displayed properly in the UI of my app. However, if I inserted to the database strings with greek characters through the UI form, they would be saved as question marks (???). In my localhost with my MYSQL database, everything works properly.

Some info:

  • Plesk Obsidian is used for hosting services administration.  
  • Collation of hosting company's database-table-columns is "utf8mb4_general_ci" (as in my local database).
  • Server connection collation is "utf8mb4_general_ci".
  • Hosting company's server info:
    • Server type: MariaDB
    • Server version: 10.5.13-MariaDB - mariadb.org binary distribution
    • Protocol version: 10
    • Server charset: cp1252 West European (latin1)
    • PhpMyAdmin Version: 5.0.3

Is it a problem that server charset is "latin1"? I asked the hosting company for that but they believe that the problem is on application level and besides that, the setting cannot be changed because it is globally set on server. Can I change anything in my app (e.g. adding something in the connection string) as a workaround on server's charset?

Is anything else the problem here that I'm missing? Has anyone delt with this before?

Thanks in advance for your time!

Kostas_Me_
  • 103
  • 3
  • 15
  • See question marks in https://stackoverflow.com/questions/38363566/trouble-with-utf8-characters-what-i-see-is-not-what-i-stored – Rick James Mar 09 '22 at 06:07

0 Answers0