Charset UTF-8

Hi,

It’s my first time using a server to upload a website ever (I’m very happy! Thank you InifnityFree!!!)

Before uploading, I give it a try first. I went to Cpainel/ On-line file manager / htdocs and I created a simple index.html and typed some words. Also, I included the but all the words with accents appeared differently.

Ex.: estará = estarà ¡
não = nã ƒo

I guess this is because of the enconding maybe. How can I fix it at Cpainel?

This sentence for some alien reason disappeared from my post above, so I’m writing again: “I included the tag meta charset UTF-8”

Open the file in Notepad++, or another text editor (not Windows Notepad) and convert your file’s encoding.
In Notepad++ is something like this:

2021.06.02_17h09m35s

4 Likes

Our file manager uses UTF-8 by default, and apparently you want to do so too if you’re setting the document charset to UTF-8 with the HTML meta tag.

If your special characters are getting mangled, that probably means that the characters you’re putting in the file are not actually UTF-8. Perhaps there is a OS or browser configuration value that needs to be set to UTF-8 too?

3 Likes

I just opened Cpainel through my mobile phone (iphone 11) and I edit a html file at file manager tool. The character that got mangled were those ã and á and I think it belong to UTF-8.

Later on, I intend to take my real project and through FillaZilla upload to the serve. In that project I will have chinese, portuguese and english characteres. Now I am worry if it will break the website with mangled characters… I hope it won’t. At Visual Code editor on a live serve my project is working just fine, later on I will upload, i hope I won’t get the same issue.

I just edit again the html file and I typed those following words, and as u can see, all mangled.
https://correiacabral.epizy.com/

Words that I typed;

não testê testé 你好****还行吧

Something doesn’t look right…

image

1 Like

AWESOME! THANK U SO MUCH!
The error was double quotes charset=“UTF-8” so I changed to one quote charset=‘UTF-8’ Now it’s working perfect!

3 Likes

That the characters exist in UTF-8 doesn’t mean that the characters you typed are UTF-8. Under the hood, every character you type needs to be translated to a binary code that translates to a number which corresponds to a character. Different character sets use different binary codes or even coding systems to encode the same characters.

So if you store a character in another character set, e.g. Windows-1252, that binary code is different for the same character in UTF-8, which is why it gets all mangled if you try to view it as UTF-8.

1 Like

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