How do I set Character Encoding to UTF-8 for default.html?

前端 未结 5 1522
庸人自扰
庸人自扰 2020-12-01 13:05

I spent the last few hours getting my website to validate HTML 4.01 Strict and I actually have succeeded in that but there is still one warning which I can\'t get rid of. Th

5条回答
  •  一整个雨季
    2020-12-01 13:19

    You need to replace the HTTP-level header.

    This should work:

    
    

    Note that the above must be the FIRST thing in your file. No exceptions. See http://us2.php.net/manual/en/function.header.php

    For general info on how to change the character set header in different web stacks, see http://www.w3.org/International/O-HTTP-charset

    Larry

提交回复
热议问题