<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>AJYA</author_name>
  <author_url>https://blog.hatena.ne.jp/AJYA/</author_url>
  <blog_title>ソフトウェア開発者の日常</blog_title>
  <blog_url>https://ajya.hatenablog.jp/</blog_url>
  <categories>
    <anon>PHP</anon>
  </categories>
  <description>文字コード変換をしてバイト数を判定しました。 photo credit: via photopin (license)文字列が特定のバイト数を超えた場合、処理を切り分けたくて以下のようなコードを作成しました。 $work= &quot;12あいうえおかきくけこさしすせそたちつてと漢字混合&quot;; $workSJIS = mb_convert_encoding($work, &quot;SJIS-win&quot;, &quot;UTF-8&quot;); $workSJISLen = strlen($workSJIS); if($workSJISLen &gt; 44) { // 特定のバイト数を超えた場合の処理 } UTF-8のまま処理するとバイト数…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fajya.hatenablog.jp%2Fentry%2F2015%2F05%2F29%2F080100&quot; title=&quot;PHP：文字列のバイト数で処理を分ける方法 - ソフトウェア開発者の日常&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>http://cdn-ak.f.st-hatena.com/images/fotolife/A/AJYA/20150529/20150529054801.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2015-05-29 08:01:00</published>
  <title>PHP：文字列のバイト数で処理を分ける方法</title>
  <type>rich</type>
  <url>https://ajya.hatenablog.jp/entry/2015/05/29/080100</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
