UTF-8编码适用于PC但不适用于移动设备

时间:2022-03-03 10:40:14

The encoding for my site seems to not work on my mobile device.

我的网站的编码似乎无法在我的移动设备上运行。

I´m using this line for setting UTF-8

我用这一行来设置UTF-8

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

On my PC everything works fine, but not on mobile.

在我的电脑上一切正常,但不是在移动设备上。

In PHPStorm I encoded the whole project as UTF-8 too.

在PHPStorm中,我将整个项目编码为UTF-8。

What is wrong?

怎么了?

2 个解决方案

#1


1  

Solved. I´ve opened the file in Notepad++ and switched the encoding from "UTF-8 without BOM" to "UTF-8"

解决了。我在Notepad ++中打开了文件,并将编码从“没有BOM的UTF-8”切换到“UTF-8”

#2


0  

I use this on one of my sites and it seems to work well.

我在我的一个网站上使用它,它似乎运作良好。

<meta charset="UTF-8" name="viewport" content="width=device-width, initial-scale=1 user-scalable=no">

#1


1  

Solved. I´ve opened the file in Notepad++ and switched the encoding from "UTF-8 without BOM" to "UTF-8"

解决了。我在Notepad ++中打开了文件,并将编码从“没有BOM的UTF-8”切换到“UTF-8”

#2


0  

I use this on one of my sites and it seems to work well.

我在我的一个网站上使用它,它似乎运作良好。

<meta charset="UTF-8" name="viewport" content="width=device-width, initial-scale=1 user-scalable=no">