{"id":885,"date":"2011-12-23T00:00:00","date_gmt":"2011-12-22T15:00:00","guid":{"rendered":"http:\/\/localhost\/blog\/?p=870"},"modified":"2014-08-14T11:24:58","modified_gmt":"2014-08-14T02:24:58","slug":"android%e3%81%aejis%e5%af%be%e5%bf%9c%e3%81%ae%e3%83%90%e3%82%b0","status":"publish","type":"post","link":"https:\/\/denasu.com\/blog\/2011\/12\/diary885","title":{"rendered":"Android\u306eJIS\u5bfe\u5fdc\u306e\u30d0\u30b0"},"content":{"rendered":"<p>Android\u7248Weather Typing\u306e\u30e9\u30f3\u30ad\u30f3\u30b0\u3092Android\u3067\u898b\u308b\u3068\u540d\u524d\u306e\u6700\u5f8c\u304c\u6587\u5b57\u5316\u3051\u3059\u308b\u3053\u3068\u304c\u3042\u308b\u554f\u984c\u3092\u4fee\u6b63\u3002Android Java\u306eURLEncoder\u304c\u30d0\u30b0\u3063\u3066\u3044\u305f\u3002\u4ee5\u524d1\u3064\u5bfe\u7b56\u3057\u305f\u306e\u3060\u304c\uff0c\u3082\u30461\u3064\u30d0\u30b0\u304c\u3042\u3063\u305f\u6a21\u69d8\u3002<\/p>\n<pre class=\"brush:java\">\r\nURLEncoder.encode(s, \"ISO-2022-JP\")\r\n<\/pre>\n<p>\u306e\u3088\u3046\u306bUnicode\u304b\u3089JIS\u30b3\u30fc\u30c9\u306b\u5909\u63db\u3057\u305f\u5834\u5408\uff0c\u4ee5\u4e0b\u306e2\u70b9\u304c\u30d0\u30b0\u3063\u3066\u3044\u308b\u3002<\/p>\n<ul>\n<li>\u5168\u89d2\u534a\u89d2\u304c\u6df7\u5728\u3057\u305f\u5834\u5408\uff0c\u5168\u89d2\u534a\u89d2\u306e\u5207\u308a\u66ff\u3048\u30dd\u30a4\u30f3\u30c8\u3067\u300c%1B%28%42\u300d\u304c\u5165\u3089\u306a\u3044<\/li>\n<li>\u6700\u5f8c\u306b\u300c%1B%28%42\u300d\u304c\u5165\u308b\u3079\u304d\u7b87\u6240\u304c\u300c%1B\u300d\u306b\u306a\u3063\u3066\u3057\u307e\u3046<\/li>\n<\/ul>\n<p>\u306a\u3093\u3066\u3044\u3044\u52a0\u6e1b\u306a\u3002\u305d\u308c\u3068\u3082JIS\u304c\u305d\u3046\u3044\u3046\u898f\u683c\u306a\u306e\u304b\u306a\u3042\u3002\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u5074\u3092\u76f4\u3057\u3066\u3082\u65e2\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u3066\u3044\u308b\u4eba\u306f\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u3057\u306a\u3044\u3068\u3044\u3051\u306a\u304f\u306a\u3063\u3066\u3057\u307e\u3046\u306e\u3067\uff0c\u30b5\u30fc\u30d0\u5074\u3067\u5bfe\u7b56\u3002\u3057\u304b\u3082Android\u306e\u30d0\u30b0\u304c\u3044\u304d\u306a\u308a\u76f4\u3063\u305f\u5834\u5408\u3067\u3082\u3046\u307e\u304f\u52d5\u4f5c\u3057\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u3002\u7d50\u5c40\u4ee5\u4e0b\u306ePerl\u30b3\u30fc\u30c9\u3067\u5bfe\u7b56\u3057\u305f\u3002<\/p>\n<pre class=\"brush:perl\">\r\nif(($value =~ \/%1B%24%42\/) && !($value =~ \/%1B%28%42\/))\r\n{\r\n    $value =~ s\/%1B([^%])\/$1\/g;\r\n    $value =~ s\/%1B%24%42((%[A-Fa-f0-9][A-Fa-f0-9])+)\r\n              \/%1B%24%42$1%1B%28%42\/g;\r\n}\r\n<\/pre>\n<p>JIS\u306e\u958b\u59cb\u30b3\u30fc\u30c9\u304c\u3042\u3063\u3066\u7d42\u4e86\u30b3\u30fc\u30c9\u304c1\u3064\u3082\u306a\u3044\u5834\u5408\uff0c\u300c%1B\u300d\u304c\u5358\u72ec\u3067\u5b58\u5728\u3057\u305f\u3089\u6d88\u3057\u3066\u304a\u304d\uff0c\u5168\u89d2\u90e8\u5206\u3092JIS\u958b\u59cb\u30b3\u30fc\u30c9\u3068JIS\u7d42\u4e86\u30b3\u30fc\u30c9\u3067\u56f2\u3080\u3068\u3044\u3046\u51e6\u7406\u3002\u4e00\u5fdc\u30c6\u30b9\u30c8\u306f\u3057\u305f\u3051\u3069\u3042\u3089\u3086\u308b\u30d1\u30bf\u30fc\u30f3\u3067\u5927\u4e08\u592b\u306a\u306e\u304b\u81ea\u4fe1\u304c\u306a\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Android\u7248Weather Typing\u306e\u30e9\u30f3\u30ad\u30f3\u30b0\u3092Android\u3067\u898b\u308b\u3068\u540d\u524d\u306e\u6700\u5f8c\u304c\u6587\u5b57\u5316\u3051\u3059\u308b\u3053\u3068\u304c\u3042\u308b\u554f\u984c\u3092\u4fee\u6b63\u3002Android Java\u306eURLEncoder\u304c\u30d0\u30b0\u3063\u3066\u3044\u305f\u3002\u4ee5\u524d1\u3064\u5bfe\u7b56\u3057\u305f\u306e\u3060\u304c\uff0c\u3082\u30461\u3064\u30d0\u30b0\u304c\u3042\u3063\u305f\u6a21\u69d8\u3002 URLEncoder.encode(s, &#8220;ISO-2022-JP&#8221;) \u306e\u3088\u3046\u306bUnicode\u304b\u3089JIS\u30b3\u30fc\u30c9\u306b\u5909\u63db\u3057\u305f\u5834\u5408\uff0c\u4ee5\u4e0b\u306e2\u70b9\u304c\u30d0\u30b0\u3063\u3066\u3044\u308b\u3002 \u5168\u89d2\u534a\u89d2\u304c\u6df7\u5728\u3057\u305f\u5834\u5408\uff0c\u5168\u89d2\u534a\u89d2\u306e\u5207\u308a\u66ff\u3048\u30dd\u30a4\u30f3\u30c8\u3067\u300c%1B%28%42\u300d\u304c\u5165\u3089\u306a\u3044 \u6700\u5f8c\u306b\u300c%1B%28%42\u300d\u304c\u5165\u308b\u3079\u304d\u7b87\u6240\u304c\u300c%1B\u300d\u306b\u306a\u3063\u3066\u3057\u307e\u3046 \u306a\u3093\u3066\u3044\u3044\u52a0\u6e1b\u306a\u3002\u305d\u308c\u3068\u3082JIS\u304c\u305d\u3046\u3044\u3046\u898f\u683c\u306a\u306e\u304b\u306a\u3042\u3002\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u5074\u3092\u76f4\u3057\u3066\u3082\u65e2\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u3066\u3044\u308b\u4eba\u306f\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u3057\u306a\u3044\u3068\u3044\u3051\u306a\u304f\u306a\u3063\u3066\u3057\u307e\u3046\u306e\u3067\uff0c\u30b5\u30fc\u30d0\u5074\u3067\u5bfe\u7b56\u3002\u3057\u304b\u3082Android\u306e\u30d0\u30b0\u304c\u3044\u304d\u306a\u308a\u76f4\u3063\u305f\u5834\u5408\u3067\u3082\u3046\u307e\u304f\u52d5\u4f5c\u3057\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u3002\u7d50\u5c40\u4ee5\u4e0b\u306ePerl\u30b3\u30fc\u30c9\u3067\u5bfe\u7b56\u3057\u305f\u3002 if(($value =~ \/%1B%24%42\/) &#038;&#038; !($value =~ \/%1B%28%42\/)) { $value =~ s\/%1B([^%])\/$1\/g; $value =~ s\/%1B%24%42((%[A-Fa-f0-9][A-Fa-f0-9])+) \/%1B%24%42$1%1B%28%42\/g; } JIS\u306e\u958b\u59cb\u30b3\u30fc\u30c9\u304c\u3042\u3063\u3066\u7d42\u4e86\u30b3\u30fc\u30c9\u304c1\u3064\u3082\u306a\u3044\u5834\u5408\uff0c\u300c%1B\u300d\u304c\u5358\u72ec\u3067\u5b58\u5728\u3057\u305f\u3089\u6d88\u3057\u3066\u304a\u304d\uff0c\u5168\u89d2\u90e8\u5206\u3092JIS\u958b\u59cb\u30b3\u30fc\u30c9\u3068JIS\u7d42\u4e86\u30b3\u30fc\u30c9\u3067\u56f2\u3080\u3068\u3044\u3046\u51e6\u7406\u3002\u4e00\u5fdc\u30c6\u30b9\u30c8\u306f\u3057\u305f\u3051\u3069\u3042\u3089\u3086\u308b\u30d1\u30bf\u30fc\u30f3\u3067\u5927\u4e08\u592b\u306a\u306e\u304b\u81ea\u4fe1\u304c\u306a\u3044\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[2],"tags":[14,8],"class_list":["post-885","post","type-post","status-publish","format-standard","hentry","category-programming","tag-android","tag-weathertyping"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4ZThs-eh","_links":{"self":[{"href":"https:\/\/denasu.com\/blog\/wp-json\/wp\/v2\/posts\/885","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/denasu.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/denasu.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/denasu.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/denasu.com\/blog\/wp-json\/wp\/v2\/comments?post=885"}],"version-history":[{"count":4,"href":"https:\/\/denasu.com\/blog\/wp-json\/wp\/v2\/posts\/885\/revisions"}],"predecessor-version":[{"id":2456,"href":"https:\/\/denasu.com\/blog\/wp-json\/wp\/v2\/posts\/885\/revisions\/2456"}],"wp:attachment":[{"href":"https:\/\/denasu.com\/blog\/wp-json\/wp\/v2\/media?parent=885"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/denasu.com\/blog\/wp-json\/wp\/v2\/categories?post=885"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/denasu.com\/blog\/wp-json\/wp\/v2\/tags?post=885"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}