Question mark icons showing up for quotation marks

2019-07-21 05:32发布

问题:

For some reason, after I add:

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

between my head tags, certain symbols (namely quotation marks) show up as diamond-shape icons with question marks in the middle, as if that symbol is not found. Anyone know what's up?

回答1:

Your text editor is saving your file, including the quotation marks, in some encoding that isn't UTF-8 (most likely CP1252). Convert the file to actually be UTF-8 and try again.



回答2:

Are these regular quote characters (ASCII 34) or the dreaded "smart quotes"? They're probably smart quotes. This typically happens when programmers cut/paste content from a word processor document. I recommend changing them to regular quotes. Doing so doesn't impact the content. It'll just give you cleaner markup and avoid annoying encoding issues.