0

I am using Jekyll which has some issues with UTF-8 files. I was able to work around this by saving the file as Unicode (UTF-16 LE).

However it is an HTML document, which until now I have been using the

<meta charset="utf-8">

line in the file. Is this charset still correct or should I be using another?

4

3 に答える 3

0

If you save the file as UTF-16 LE, you have to update the <meta> tag to match.

于 2013-02-04T20:09:16.773 に答える
0

The document cited deals with “incorrect UTF-8 characters”, whatever that means. Just don’t do incorrect UTF-8 characters.

Saving an HTML file as UTF-16 is normally pointless, because UTF-16 just does not work on the web. Of course the meta tag should describe the real encoding, but that’s not the point, and charset declaration in HTTP headers will override any meta tags.

So keep using UTF-8, and fix the problem with your character data, instead of creating a new, serious problem.

于 2013-02-04T20:30:41.510 に答える
0

I found some information from the World Wide Web Consortium.

HTML5 with UTF-16
Ensure that there is a byte-order mark 
at the beginning of the file. 

The HTML Working Group is currently discussing whether 
you can use a meta element declaration in the head 
element when the encoding is UTF-16. For now, don't.
于 2013-02-05T01:27:11.990 に答える