<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>nihohi</author_name>
  <author_url>https://blog.hatena.ne.jp/nihohi/</author_url>
  <blog_title>作業記録/備忘録(仮)</blog_title>
  <blog_url>https://nihohi.hatenadiary.org/</blog_url>
  <categories>
    <anon>python</anon>
    <anon>文字コード</anon>
  </categories>
  <description>(一番左の半角チルダはどこでも同じように見えると思いますが、)表示環境によっては真ん中と、一番右の波ダッシュが同じように見えるかもしれませんが、真ん中と、右の波ダッシュは異なります。 その証拠に、pythonでsを表示させると違う文字コード(\u301cと、\uff5e)として見えます。 &gt;&gt;&gt; s = u&quot;~〜〜&quot; &gt;&gt;&gt; s u'~\u301c\uff5e'これをshift_jisでエンコードすると、エンコードに失敗します。 &gt;&gt;&gt; s.encode(&quot;shift_jis&quot;) Traceback (most recent call last): File &quot;&lt;stdin&gt;&quot;, line 1…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fnihohi.hatenadiary.org%2Fentry%2F20120510%2F1336635554&quot; title=&quot;日本語文字の扱い(windows向けには Shift_JISでなくcp932で扱う) - 作業記録/備忘録(仮)&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></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2012-05-10 16:39:14</published>
  <title>日本語文字の扱い(windows向けには Shift_JISでなくcp932で扱う)</title>
  <type>rich</type>
  <url>https://nihohi.hatenadiary.org/entry/20120510/1336635554</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
