开发者

Charset UTF-8 doesn't work (stuck with these ?-marks)

开发者 https://www.devze.com 2023-02-21 16:06 出处:网络
I have a Unicode problem... I´ve done this before but for now, I cannot understand why the Icelandic letters don´t show up - I have those question marks again

I have a Unicode problem... I´ve done this before but for now, I cannot understand why the Icelandic letters don´t show up - I have those question marks again

Here is the url (very plain and short html5) http://nicejob.is/new/

Everything I Google says: use the <meta charset="utf-8"> as I do.

Any suggestions开发者_如何学运维?


Your page is already viewed as UTF-8. But your source code is not saved as UTF-8.

Please change the encoding of your source code file to UTF-8.


Not all browsers support HTML5-way tags yet

here you can see table of compability

Try this instead:

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


I can see a couple of issues.

  1. The META should look like this:

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

  2. The <html> specified lang="en" which might be prone to confusing some browsers.


When I view the HTML from the browser, the question marks are encoded as 0xEF 0xBF 0xBD, which is the UTF-8 encoding for the byte order mark or BOM, aka U+FEFF. So, for whatever reason, the HTML is not transmitted as sensible UTF-8 (though it does seem to be valid UTF-8).


Probably you are using some text editor like notepad++, and you didn't set up encoding to UTF-8 in that text editor.


What you have to do is to save the file with utf-8 encoding by using Notepad (the attached one with Windows).

Steps:

  • Save as ..

  • In the below options ... you will find encoding option choose UTF-8 ...

  • And save the file ...

  • Then add the line <meta charset="UTF-8" /> inside your file ...

And it will work.

0

精彩评论

暂无评论...
验证码 换一张
取 消