Problems displaying French accented characters in UTF-8

前端 未结 4 1830
清酒与你
清酒与你 2021-01-12 07:14

I\'m working on a French language site built in CakePHP. I have tried multiple functions to try and convert the text into UTF-8 and display properly, but have had no succes

4条回答
  •  一向
    一向 (楼主)
    2021-01-12 07:44

    First: Check your php files encoding! I work on Mac, I use Coda to program, and it has an option to convert charset's, sometimes i get troubles like this and converting to UTF-8 always fix them. I think that Notepad++ can do that on windows. (If you do this on your PHP files, every strings on them will not need the functions htmlspecialchars(), html_entity_decode, etc )

    Second: if you are using HTML Output, check if you have on your header...

    Third: Do what @janmoesen said on your MySQL DB.

    Tell me something about that.

提交回复
热议问题