<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>ymotongpoo</author_name>
  <author_url>https://blog.hatena.ne.jp/ymotongpoo/</author_url>
  <blog_title>YAMAGUCHI::weblog</blog_title>
  <blog_url>https://ymotongpoo.hatenablog.com/</blog_url>
  <categories>
    <anon>Python</anon>
  </categories>
  <description>はじめに こんにちは、Python界の情弱です。Pythonで文字の長さではなく、文字幅を取得したい場合はどうしたらいいのかな、という話。最近は日本語はUTF-8で処理することがほとんどですが、UTF-8は1文字3バイトだったりしてlen()を使うとおかしな長さになったりして、うぼあああ、とかなってたら清水川先生と世界の小宮氏 (@tk0miya)がマッハで教えてくれました。 なおこの記事は引用部のコードはAPL2.0 参考 tk0miya / blockdiag / source — Bitbucket 7.9. unicodedata — Unicode Database — Python…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fymotongpoo.hatenablog.com%2Fentry%2F20120511%2F1336706463&quot; title=&quot; 全角文字の文字幅を取得する - YAMAGUCHI::weblog&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-11 12:21:03</published>
  <title> 全角文字の文字幅を取得する</title>
  <type>rich</type>
  <url>https://ymotongpoo.hatenablog.com/entry/20120511/1336706463</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
