Laravel 5 charset not working correctly on the views. But it working well when I dump it from controller

后端 未结 4 1516
囚心锁ツ
囚心锁ツ 2020-12-11 04:18

I\'m facing a charset problem here. I\'m developing an app that uses a sql server database. The database was not created for this app, it exists before it and works very wel

4条回答
  •  甜味超标
    2020-12-11 04:39

    Generally sticking to UTF-8 keeps life simple.

    Be super careful copying and pasting from anywhere else into your code - basically always go through Notepad++ and use its convert to UTF-8 (without BOM) before copying and pasting into your code.

    First question - how is the data getting into your database?

    Mega Top Tip If you're using a form, make sure you've set the accepted charset attribute on the form element:

    Then make sure all your views (including error pages), have

    
    

    Or the following if you're doing HTML4

    
    

提交回复
热议问题