Home  >  Q&A  >  body text

将返回前一个浏览页面的代码粘在记事本中,保存为html文件,在本地运行,出现乱码?

如题

汪汪汪汪2795 days ago1078

reply all(2)I'll reply

  • 数据分析师

    数据分析师2017-09-30 22:54:06

    Put the code that returns the previous browsing page into Notepad, save it as an html file, run it locally, and garbled characters appear? - PHP Chinese Website Q&A - Paste the code that returns the previous browsing page into Notepad, and save it as html When the file is run locally, garbled characters appear? - PHP Chinese website Q&A

    Take a look and learn.

    reply
    0
  • 阿神

    阿神2016-12-19 11:04:56

    记事本一般编码是gbk编码。

    2种方法。

    1.把这一行代码

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

    改成

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

    2.用别的编辑器,如DW、sublime text。

    reply
    0
  • Cancelreply