<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>maru_cc</author_name>
  <author_url>https://blog.hatena.ne.jp/maru_cc/</author_url>
  <blog_title>maru.cc@はてな</blog_title>
  <blog_url>https://marucc.hatenablog.com/</blog_url>
  <categories>
    <anon>php</anon>
  </categories>
  <description>前提として、phpはUTF-8で書いてます。 で、以下のようなphpを実行したとします。 &lt;?php $a = &quot;aaa（bbb）ccc&quot;; // 全角の括弧 var_dump(mb_detect_encoding($a)); $b = mb_convert_kana($a, &quot;as&quot;); var_dump(mb_detect_encoding($b)); 結果は。 string(5) &quot;UTF-8&quot; string(6) &quot;EUC-JP&quot;なぜか、EUC-JPとして判別されてますし、$bの内容を表示すると全角括弧が文字化けしてしまっています。 対応策として、短い文字列やユーザ入力の文字列を渡す場…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmarucc.hatenablog.com%2Fentry%2F20080212%2F1202813263&quot; title=&quot;mb_convert_kanaで文字コード指定しないと誤変換する場合がある - maru.cc@はてな&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>2008-02-12 19:47:43</published>
  <title>mb_convert_kanaで文字コード指定しないと誤変換する場合がある</title>
  <type>rich</type>
  <url>https://marucc.hatenablog.com/entry/20080212/1202813263</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
