<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>srkzhr</author_name>
  <author_url>https://blog.hatena.ne.jp/srkzhr/</author_url>
  <blog_title>半径5メートル</blog_title>
  <blog_url>https://srkzhr.hatenadiary.org/</blog_url>
  <categories>
    <anon>Java</anon>
  </categories>
  <description>モバイルなどのShift_JIS環境から投げられたGETパラメータのクエリをjava.net.URLDecoder.decode(String, String)でdecodeしようとすると文字化けしてしまう場合があります。これはURLDecoder.decodeにバグがあるというわけではなく、URLEncoder.encodeでencodeされたものを正しくdecodeするという仕様であるためです。具体的に「http://example.com/?q=%82Q」のようなリファラからクエリ文字列を抽出するケースを考えてみます。 String arg = &quot;%82Q&quot;; System.out.pr…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsrkzhr.hatenadiary.org%2Fentry%2F20091104%2F1257352836&quot; title=&quot;SJIS環境からのクエリ文字列に対するURLDecoderでの文字化け - 半径5メートル&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-11-04 01:40:36</published>
  <title>SJIS環境からのクエリ文字列に対するURLDecoderでの文字化け</title>
  <type>rich</type>
  <url>https://srkzhr.hatenadiary.org/entry/20091104/1257352836</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
