<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="1" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[1]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">JavaScript</anchor> の<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">関数</anchor> <dfn><code class="JS" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">escape()</anchor></code></dfn>, <dfn><code class="JS" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">unescape()</anchor></code></dfn>
は、<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">文字列</anchor>を<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">パーセント符号化</anchor>や <code class="URI"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">%u</anchor></code> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">符号化</anchor>します。</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="2" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[2]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">URL</anchor> で用いられている<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">パーセント符号化</anchor>とは互換性がなく、 <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">URL</anchor>
用としては <code class="JS" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">encodeURIComponent()</anchor></code>, <code class="JS" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">decodeURIComponent()</anchor></code>
などが用意されています。</p><section><h1>仕様書</h1><refs xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><ul xmlns="http://www.w3.org/1999/xhtml"><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="11" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[11]</anchor-end> <cite>ECMAScript® 2017 Language Specification</cite>
(<time>2016-06-04 05:39:35 +09:00</time>)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://tc39.github.io/ecma262/#sec-escape-string">https://tc39.github.io/ecma262/#sec-escape-string</anchor-external></li><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="15" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[15]</anchor-end> <cite>ECMAScript® 2017 Language Specification</cite> (<time>2016-06-04 05:39:35 +09:00</time>) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://tc39.github.io/ecma262/#sec-unescape-string">https://tc39.github.io/ecma262/#sec-unescape-string</anchor-external></li></ul></refs></section><section><h1><code>%u</code> 符号化</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="16" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[16]</anchor-end> <dfn><code class="URI">%u<var>HHHH</var></code></dfn> は、 <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">JavaScript</anchor> の<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">関数</anchor>
<code class="JS" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">escape()</anchor></code>, <code class="JS" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">unescape()</anchor></code> で用いられている<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">符号化</anchor>です。
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">URL</anchor> の<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">パーセント符号化</anchor>と半ば意図的に混同され、現在でもたまに用いられています。</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="17" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[17]</anchor-end> 仕様上は <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">URL</anchor> で <code class="URI">%u</code> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">符号化</anchor>を用いることは認められていません。</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="4" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[4]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Latin1</anchor> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">文字</anchor> (<code class="char"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">U+00FF</anchor></code> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">以下</anchor>) は<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">百分率符号化</anchor>されます。</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="5" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[5]</anchor-end> それ以外の<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">文字</anchor>は <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">UTF-16</anchor> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">符号単位</anchor>ごとに <code class="URI"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">%u</anchor></code> を使って<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">符号化</anchor>されます。</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="6" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[6]</anchor-end> 歴史的には、<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">JavaScript</anchor> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">エンジン</anchor>の<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">内部コード</anchor> (<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">シフトJIS</anchor>、<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">UTF-16LE</anchor> + <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">BOM</anchor> など) 
のまま<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">百分率符号化</anchor>されることがありました。</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="7" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[7]</anchor-end> 歴史的には、 <code class="char"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">U+0020</anchor></code> が <code class="URI"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">+</anchor></code> になることがありました。</p><comment-p xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:"><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="28" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[28]</anchor-end> <code xmlns="http://www.w3.org/1999/xhtml">%u</code> に注意が行きがちですが、
[ <sw-cc xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">U+0080</sw-cc>, <sw-cc xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">U+00FF</sw-cc> ]
が <code xmlns="http://www.w3.org/1999/xhtml">%<var>HH</var></code>
となることにも注意が必要です。</comment-p><comment-p xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:"><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="29" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[29]</anchor-end> <code xmlns="http://www.w3.org/1999/xhtml">escape()</code> では使われませんが、
[ <sw-cc xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">U+0000</sw-cc>, <sw-cc xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">U+00FF</sw-cc> ]
も 
<code xmlns="http://www.w3.org/1999/xhtml">%u</code> で表現可能なことに注意が必要です。</comment-p><comment-p xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:"><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="30" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[30]</anchor-end> 
[ <sw-cc xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">U+10000</sw-cc>, <sw-cc xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">U+10FFFF</sw-cc> ]
は<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">UTF-16符号単位</anchor> (<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">サロゲート</anchor>) 2つの組で表されることに注意が必要です。</comment-p></section><section><h1>歴史</h1><section><h1>JavaScript</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="18" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[18]</anchor-end> <code class="URI"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">%u</anchor></code> による<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">符号化</anchor>は <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">ECMA-262</anchor> の第1版で 
<code class="JS" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">escape()</anchor></code>, <code class="JS" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">unescape()</anchor></code> 両<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">関数</anchor>の挙動として規定されました。
この挙動は紆余曲折を経て現在では各 <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">JavaScript</anchor> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">エンジン</anchor>で実装されています。</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="9" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[9]</anchor-end> <cite xml:lang="ja">Escape</cite> (<time>2011-06-12 11:47:57 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://web.archive.org/web/20050222015746/http://www.felix.jp/~yugo/js/guide/escape.html">http://web.archive.org/web/20050222015746/http://www.felix.jp/~yugo/js/guide/escape.html</anchor-external></p><blockquote><p>ECMA TC39 が ECMA-262 を制定するとき、escape および unescape は Unicode を用いると決めた。具体的には、Unicode エンコーディングが 0xFF 以下の文字は、16進法の数字二つの %HH 形式を用いる。 0xFF より大きい場合には、%uHHHH 形式を用いる。</p></blockquote><blockquote><p>MSIE のバージョン 4以降が用いる JScript では escape/unescape による URL エスケープが出来なくなった。</p></blockquote><blockquote><p>Netscape は、ECMA-262 に従わず、従来の ISO Latin-1 を使うと決定したため、Netscape Communicator 4.06 以降で用いられている JavaScript 1.3 でも escape/unescape を URL エスケープに利用できる。そのため、%uHHHH 形式はサポートされていない。 </p></blockquote><blockquote><p>当初の実装では Mozilla でも ECMA-262 準拠で RFC 1738 非準拠の escape/unescape を使っていた。ところが、バグ報告があったため、2000年1月に従来通りの ISO Latin-1 を使った escape/unescape に変更された。 </p></blockquote><blockquote><p>String Class を実装している js/src/jsstr.c で escape/unescape を実装している。 String Class を実装しているファイルに記述しているが、もちろん escape と unescape は Global オブジェクトのプロパティーである。実は、DOM の Window オブジェクトを実装している dom/src/base/nsJSWindow.cpp でも escape/unescape を実装している。こちらは従来通り ISO Latin-1 を使っている。 Mozilla は内部コードとして UCS-2 を用いており、読み込んだページは内部コードに変換されるが、DOM の escape/unescape は元のページの文字コードでエンコード/デコードする。 </p></blockquote><blockquote><p>Mozilla では起動時に、SpiderMonkey の escape/unescape をいったん定義するが、その後 DOM の escape/unescape で上書きする。このため、Mozilla 上で escape/unescape を使うと ISO Latin-1 を用いた escape/unescape が呼び出され、SpiderMonkey を単体で動かした場合には ECMA-262 準拠の escape/unescape が呼ばれる。 Mozilla からは Unicode エスケープである ECMA-262 準拠の escape/unescape は利用できない。</p></blockquote><blockquote><p>もともと escape/unescape は JavaScript engine ではなく、Client-side 部分である libmocha で実装していたが、ECMA-262 が escape/unescape の仕様を定めたので、1998年5月に JavaScript engine で実装するように変更された。また、ECMA-262 になってスペースと &quot;/&quot; の扱いも変更された。「昔の libmocha の escape をエミュレートしたいのなら、第2引数で escape の振る舞いを指定しろ」というコメントが /js/src/jsstr.c に書いてある。このコメントの通り、第2引数に Bit 0, 1, 2 からなる mask を指定でき、この値に応じてスペースと &quot;/&quot; に対する振る舞いが変更される。 mask の値が不適切だと、&quot;invalid string escape mask&quot; というエラーが発生することがあるので注意すること。デフォルトが ECMA-262 の escape に対応した 7 である。ちなみに Java による JavaScript engine Rhino でも、mask 指定に対応している。</p></blockquote><blockquote><p>その escape/unescape だが、1999年12月に出た ECMA-262 3rd Edition では Compatibility の項に移されて、正式な仕様の一部ではなくなった。もっとも動作自体は 2nd Edition から変更されていない。</p></blockquote><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="10" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[10]</anchor-end> <cite>Bug 22594 – <strong>[</strong>dogfood<strong>]</strong> JavaScript escape() is incompatable w/ 4.x</cite> (<time>2011-06-12 11:51:18 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://bugzilla.mozilla.org/show_bug.cgi?id=22594">https://bugzilla.mozilla.org/show_bug.cgi?id=22594</anchor-external></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="150" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[150]</anchor-end> <cite>Bug 44272 - javascript escape and unescape don't work properly with unicode chars</cite> <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://bugzilla.mozilla.org/show_bug.cgi?id=44272">https://bugzilla.mozilla.org/show_bug.cgi?id=44272</anchor-external></p></section><section><h1>Perl</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="25" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[25]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">CGI.pm</anchor> は <code class="URI" xml:lang="en">%<var>HHHH</var></code>
の<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">復号</anchor>を実装しています (非 <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">EBCDIC</anchor> 環境のみ)。
ただし<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">サロゲート・ペア</anchor>はそのまま2<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">文字</anchor>になってしまいます。</p><figure class="quote"><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="26" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[26]</anchor-end> <cite>URI::Escape::JavaScript - search.cpan.org</cite>
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://search.cpan.org/~taniguchi/URI-Escape-JavaScript-0.04/lib/URI/Escape/JavaScript.pm">http://search.cpan.org/~taniguchi/URI-Escape-JavaScript-0.04/lib/URI/Escape/JavaScript.pm</anchor-external></figcaption><blockquote><p>URI::Escape doesn't work for escaping and unescaping JavaScript like Unicode URI-escape (&quot;%uXXXX&quot;). But you can use this module to do those.</p></blockquote></figure><figure class="quote"><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="27" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[27]</anchor-end> <cite>404 Blog Not Found:CPAN - URI::Escape::XS Released!</cite> (<time>2007-04-28 04:04:46 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://blog.livedoor.jp/dankogai/archives/50818918.html">http://blog.livedoor.jp/dankogai/archives/50818918.html</anchor-external></figcaption><blockquote><p>もう一つは、%uHHHHの対応。一応にぽたん作のURI::Escape::JavaScriptというものがあるのですが、コードを見るとSurrogate Pairに未対応。</p></blockquote><blockquote><p>In spite of that, there are a significant number of URIs with %uHHHH
escapes. Therefore this module supports decoding only.</p></blockquote></figure></section><section><h1>IRI</h1><figure class="quote"><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="19" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[19]</anchor-end> <cite xml:lang="en">RFC 3987 - Internationalized Resource Identifiers (IRIs)</cite> (<time>2011-05-08 01:17:48 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://tools.ietf.org/html/rfc3987#appendix-A.3">http://tools.ietf.org/html/rfc3987#appendix-A.3</anchor-external></figcaption><blockquote><p>Instead of using the existing percent-encoding convention of URIs,
which is based on octets, the idea was to create a new encoding
convention; for example, to use &quot;%u&quot; to introduce UCS code points.
Using the existing octet-based percent-encoding mechanism does not
need an upgrade of the URI syntax and does not need corresponding
server upgrades.</p></blockquote></figure><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="20" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[20]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">RFC 3987</anchor> は <anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="19" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;19</anchor-internal> のように述べており、 <code class="URI"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">%u</anchor></code> 
を使う方法を導入せずとも既存の<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">パーセント符号化</anchor>だけで同じことが実現できて互換性も高いとしています。</p></section><section><h1></h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="3" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[3]</anchor-end> <cite xml:lang="en">Functions - MDC Docs</cite> (<time>2011-06-12 11:38:48 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Functions#escape_and_unescape_Functions">https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Functions#escape_and_unescape_Functions</anchor-external></p><blockquote><p>The escape and unescape functions let you encode and decode strings. The escape function returns the hexadecimal encoding of an argument in the ISO Latin character set. The unescape function returns the ASCII string for the specified hexadecimal encoding value.</p></blockquote><refs xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><ul xmlns="http://www.w3.org/1999/xhtml"><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="12" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[12]</anchor-end>  <cite xml:lang="en">Functions - MDC Docs</cite>
( (<time>2011-06-12 11:38:08 +09:00</time> 版))
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Functions#escape_and_unescape_Functions">https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Functions#escape_and_unescape_Functions</anchor-external></li><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="8" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[8]</anchor-end> <cite xml:lang="en">window.unescape - MDC Docs</cite>
( (<time>2011-06-12 11:45:25 +09:00</time> 版))
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://developer.mozilla.org/en/window.unescape">https://developer.mozilla.org/en/window.unescape</anchor-external></li><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="13" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[13]</anchor-end> <cite xml:lang="en">window.escape - MDC Docs</cite>
( (<time>2011-06-12 11:45:44 +09:00</time> 版))
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://developer.mozilla.org/en/DOM/window.escape">https://developer.mozilla.org/en/DOM/window.escape</anchor-external></li></ul></refs><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="14" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[14]</anchor-end> <cite>JavaScriptにおけるURLエンコードの処理</cite>
( (<time>2003-02-03 15:40:49 +09:00</time> 版))
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://www.cresc.co.jp/tech/java/URLencoding/JavaScript_URLEncoding.htm">http://www.cresc.co.jp/tech/java/URLencoding/JavaScript_URLEncoding.htm</anchor-external></p><figure class="quote"><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="21" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[21]</anchor-end> <cite xml:lang="en">Percent-encoding - Wikipedia, the free encyclopedia</cite> (<time>2007-04-18 03:08:17 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://en.wikipedia.org/wiki/Percent-encoding#Non-standard_implementations">http://en.wikipedia.org/wiki/Percent-encoding#Non-standard_implementations</anchor-external></figcaption><blockquote><p>There exists a non-standard encoding for Unicode characters: %uxxxx, where xxxx is a Unicode value represented as four hexadecimal digits. This behavior is not specified by any RFC and has been rejected by the W3C. The third edition of ECMA-262 still includes an escape(string) function that uses this syntax, but also an encodeURI(uri) function that converts to UTF-8 and percent-encodes each octet.</p></blockquote></figure><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="22" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[22]</anchor-end> <code class="JS" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">escape()</anchor></code> を誤って使っているらしく <code><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">%u</anchor></code>
が使われることが今でも大きなサイトでもあったりします。 <time>2014-09-06T22:59:46.600Z</time></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="24" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[24]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">ニコニコ動画</anchor>の <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">URL</anchor> で <code>%u</code> が使われています。</p><figure class="quote"><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="23" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[23]</anchor-end> <cite xml:lang="ja">民泊のエアビーアンドビー、苦情サイト新設 - WSJ</cite>
( (<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">NATHAN OLIVAREZ-GILES</anchor>著, <time>2016-06-03 19:05:57 +09:00</time>))
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://jp.wsj.com/articles/SB10513819889225894892604582103810164964978">http://jp.wsj.com/articles/SB10513819889225894892604582103810164964978</anchor-external></figcaption><blockquote><p>&lt;meta name=&quot;apple-itunes-app&quot; content=&quot;app-id=364387007,app-argument=wsj://launch?articleid=SB10513819889225894892604582103810164964978&amp;headline=%u6C11%u6CCA%u306E%u30A8%u30A2%u30D3%u30FC%u30A2%u30F3%u30C9%u30D3%u30FC%u3001%u82E6%u60C5%u30B5%u30A4%u30C8%u65B0%u8A2D&amp;weburl=http://jp.wsj.com/articles/SB10513819889225894892604582103810164964978&quot; /&gt;</p><p>&lt;meta name=&quot;al:ios:url&quot; content=&quot;wsj://launch?articleid=SB10513819889225894892604582103810164964978&amp;headline=%u6C11%u6CCA%u306E%u30A8%u30A2%u30D3%u30FC%u30A2%u30F3%u30C9%u30D3%u30FC%u3001%u82E6%u60C5%u30B5%u30A4%u30C8%u65B0%u8A2D&amp;weburl=http://jp.wsj.com/articles/SB10513819889225894892604582103810164964978&quot; /&gt;</p></blockquote></figure><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="31" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[31]</anchor-end> 
<cite xml:lang="en-US">Encode::JavaScript::Cyrillic - Javascript bug fix for cyrillic((bug : %u0410 -%u044f)) - metacpan.org</cite>, <time>2025-06-25T08:19:59.000Z</time> <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://metacpan.org/pod/Encode::JavaScript::Cyrillic">https://metacpan.org/pod/Encode::JavaScript::Cyrillic</anchor-external></p></section></section></body></html>