Answer the question
In order to leave comments, you need to log in
Why is utf8 encoding byte lost in php-fpm?
There is a web server with Nginx and php-fpm on board.
usecase: We create a text file on the web server with content in Cyrillic in utf-8 encoding. If this file is given the .html extension, then Russian characters are normally displayed in the browser. If you rename it to .php, then Russian characters turn into "question questions" (????? ?? ????).
At the same time, if in the .php file the text is displayed not as a spool, but through <? echo "cyrillic"; ?> then the text is not "wrapped".
Tell me what could be the problem? Where can one byte of encoding be lost?
Answer the question
In order to leave comments, you need to log in
What encoding are the files in? I'm assuming it's not UTF-8, or UTF-8 BOM.
Convert files to UTF-8 without BOM, for example using Notepad++
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question