Accented letters are not displayed correctly on the server, even if the encoding is correct

I wrote some utf-8 encoded html. in the html header there is also

<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> 

everything works fine in local mode, but when I upload files to the server, I see all my letters

àèìòù etc

distorted.

Does anyone know how this could be a problem? is it possible that the server forces an encoding that is not utf-8?

Many thanks

+3
source share
2 answers

In fact, the META tag is not all that is needed to properly encode UTF-8. Your server can still send the page as the Content-Type: text/html; charset=ISO-8859-1page title.

, . Live HTTP Headers Firefox.

UTF-8 , (UTF-8: The Secret ), , , , .

: , UTF-8, . PHP headers() :

header('Content-Type:text/html; charset=UTF-8');

+4

utf-8. . PHPStorm : File- > File Encoding- > utf-8

+4

Source: https://habr.com/ru/post/1769355/


All Articles