<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>t_komura</author_name>
  <author_url>https://blog.hatena.ne.jp/t_komura/</author_url>
  <blog_title>t_komuraの日記</blog_title>
  <blog_url>https://t-komura.hatenadiary.org/</blog_url>
  <categories>
    <anon>PHP</anon>
    <anon>mbstring</anon>
  </categories>
  <description>最近、mb_detect_encoding() について調べていたので、そのメモです。mb_detect_encoding() は文字コード検出を行う関数です(mb_detect_encoding() - PHP マニュアル)。 結論としては、以下の問題があるため、mb_detect_encoding() を文字コード判定には向いていないように思います。 判定が甘い 例えば、(&quot;SJIS&quot; === mb_detect_encoding( &quot;\x81&quot;, &quot;SJIS&quot; )) は SJIS の上位バイトのみの判定になり、FALSE を返してほしいところですが、TRUE を返します。 第3引数に s…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ft-komura.hatenadiary.org%2Fentry%2F20090615%2F1245078430&quot; title=&quot; mb_detect_encoding() は文字コード判定として使用できるか(その1) - t_komuraの日記&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>2009-06-15 00:07:10</published>
  <title> mb_detect_encoding() は文字コード判定として使用できるか(その1)</title>
  <type>rich</type>
  <url>https://t-komura.hatenadiary.org/entry/20090615/1245078430</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
