首页 > 技术相关 > &#65279 is the culprit for mysterious white gaps

&#65279 is the culprit for mysterious white gaps

2017年8月29日 发表评论 阅读评论

I’m coding html with Visual studio, and has become so frustrated that CSS sometimes doesn’t work and there are some mysterious white gaps.

After struggling for hours I’ve just noticed that there are some “&#65279” in the code.

These characters are byte order marks (BOMs), aka “zero width no-break space”. These are totally invisible in the editor (but if you open it in Word and show the hidden marks, they’ll show). In Word they can be replaced with ^u8520.

Visual Studio saves UTF-8 files “with signature” by default, which also saves the BOM characters.

The remedy is to choose the encoding “UTF-8 without signature”…

分类: 技术相关 标签:
  1. 本文目前尚无任何评论.
  1. 本文目前尚无任何 trackbacks 和 pingbacks.

%d 博主赞过: