<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>yuheiomori0718</author_name>
  <author_url>https://blog.hatena.ne.jp/yuheiomori0718/</author_url>
  <blog_title>メモ置き場</blog_title>
  <blog_url>https://y0m0r.hateblo.jp/</blog_url>
  <categories>
    <anon>python</anon>
  </categories>
  <description>utf8のテキストファイルには読み込んでBOM(Byte Order Mark)が付いている場合がある。バイトオーダーマーク - WikipediaemacsでBOM付きのutf8のファイルを作成するには、M-x set-buffer-file-encoding-systemで「utf-8-with-signature」を選択する。出来上がったファイルをhexdumpしてみると先頭がef bb bfであることがわかる 単純にstartswithでバイト列の先頭を比較して除去することができる UTF8_BOM = bytearray([0xEF, 0XBB, 0XBF]) def strip_b…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fy0m0r.hateblo.jp%2Fentry%2F20140312%2F1394642868&quot; title=&quot;Python2でutf8のbomを削除する - メモ置き場&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/y/yuheiomori0718/20140312/20140312112706.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2014-03-12 01:47:48</published>
  <title>Python2でutf8のbomを削除する</title>
  <type>rich</type>
  <url>https://y0m0r.hateblo.jp/entry/20140312/1394642868</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
