Problem with the charset

Website

http://japanculture.rf.gd/

Error

The utf-8 charset doesn’t work.

Screen

What do you mean it “dosent work”? Your site looks fine to me.

The info page dont take the accented letters. Try to scroll down in the index and then click on bleach.

Those meta tags make the code use the charset you defined.
But it’s probably the charset of the file itself that’s wrong.
Use your text editor to convert the file’s charset to UTF-8 and re-upload it to the server.

Using VS code, just open the file and change the encoding on the bottom bar:

In Notepad++, this is the way to do it:

2021.06.02_17h09m35s

4 Likes

It is arleady in utf8. I get the data from the database. If i insert the text in the normal html, it works.


Hum! Than it’s most probably the database collation that is not right.

Did you create the database and database content on InfinityFree or you loaded the database content from an .sql file?

I created the database and the table on infinity and load the content from external file.



That seems to be the problem.
That utf8mb4_spanish_ci must be causing that problem.

Check if the collation of the database and of its tables is the same in your “home” database and in the server’s database.

In the screens u can see is arleady all unicode_ci. There isn’t other settings.

The screenshot shows that the table “anime” of one of the databases has the utf8_unicode_ci collation.
But you need to check if both databases have that table with the same collation. The one you used to create the dump file and the one you have on InfinityFree’s server.

Also, try to open the dump file that you used to import the database content in a text editor and see if all the characters are OK or if they were already messed up.

I arleady recompiled all columns with a normal ctrl+c and in the database the accented letters are ok, now i post more screens.



2

I’m out of ideas. :confused:
Maybe someone else can help you.

:C this is so sad… thanks so much for your help.

1 Like

Could you try using HTML unicode for your characters in your HTML file?

is impossible to use it fror 1000 pages or + for all accented letters.

What do you mean it’s impossible? It can be done.

In your code, do you explicitly set the charset on the database connection? If not, you should do so. It doesn’t default to UTF-8, which can cause some weird issues with special characters.

2 Likes

Resolved. Thanks so much for the help!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.