<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>onsanai</author_name>
  <author_url>https://blog.hatena.ne.jp/onsanai/</author_url>
  <blog_title>物理の駅 Physics station by 現役研究者</blog_title>
  <blog_url>https://phst.hateblo.jp/</blog_url>
  <categories>
    <anon>クラウド</anon>
    <anon>Python</anon>
    <anon>C#</anon>
  </categories>
  <description>いつからかSlackのチャンネル名に日本語が使えるようになったが、SlackからエクスポートしたZIPファイルのファイル名、ディレクトリ名はcp437 コードページ437 - Wikipedia でエンコードされているため、UTF-8にするには、cp437としてエンコードする必要がある。 (この現象は、Windowsだけかもしれん。他の環境では未確認) Pythonの場合、ZIPファイルは自動的にcp437で開かれるので、ファイル名のみエンコードしてからutf-8でデコードする。 import zipfile with zipfile.ZipFile(zipPath, 'r') as myzi…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fphst.hateblo.jp%2Fentry%2F2022%2F08%2F03%2F080000&quot; title=&quot;SlackからエクスポートしたZIPファイル内のファイルパスの文字化けを修正する - 物理の駅 Physics station by 現役研究者&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>2022-08-03 08:00:00</published>
  <title>SlackからエクスポートしたZIPファイル内のファイルパスの文字化けを修正する</title>
  <type>rich</type>
  <url>https://phst.hateblo.jp/entry/2022/08/03/080000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
