Why not login to Qiita and try out its useful features?

We'll deliver articles that match you.

You can read useful information later.

29
24

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

HTMLに&#65279が表示されて困った時のメモ

Last updated at Posted at 2015-07-02

WordPressで要素間に変なスキマができていた。
よくみたら、要素テキストに「&#65279」という文字が表示されていた。
ChromeのDeveloper toolでみるとこんな感じだ
image

調査したところ、これはBOMであり、windowsのメモ帳で編集しちゃうと、BOMがつくらしい。
いろいろなサイトで、テキストエディタで「UTF-8 without BOM」に変換すれば消えると書いてあるのだが、消えなかった。
ちなみに使用したのはNotepad++
編集したファイルはheader.php

いろいろ調べてみると、バイナリエディタで削除してもOKらしい。
&#65279は、バイナリにすると「EF BB BF」だ。

Notepad++のHex Editorプラグインを使って削除

Notepad++にHex Editorというバイナリ編集ができるプラグインがあるので、
これをインストールして、該当のファイルを開いて、「EF BB BF」を検索
確かにあった
image

これを選択して、右クリックで削除して保存。ちなみに3箇所もあった。

再度Chromeで見てみると・・
image

おお!消えた。

こんなことで小一時間要してしまいました。
しかしいつこのモジコードが入ったのか不明。
Windowsのメモ帳を使ったとは思えないのだが。。

29
24
3

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up

Qiita Conference 2025 will be held!: 4/23(wed) - 4/25(Fri)

Qiita Conference is the largest tech conference in Qiita!

Keynote Speaker

ymrl、Masanobu Naruse, Takeshi Kano, Junichi Ito, uhyo, Hiroshi Tokumaru, MinoDriven, Minorun, Hiroyuki Sakuraba, tenntenn, drken, konifar

View event details
29
24

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?