{"id":1751,"date":"2015-09-25T20:26:29","date_gmt":"2015-09-25T11:26:29","guid":{"rendered":"http:\/\/appsweets.net\/blog\/?p=1751"},"modified":"2015-09-25T20:26:29","modified_gmt":"2015-09-25T11:26:29","slug":"handling-unicode","status":"publish","type":"post","link":"https:\/\/appsweets.net\/blog\/2015\/09\/25\/handling-unicode\/","title":{"rendered":"Handling Unicode"},"content":{"rendered":"<div class=\"db9cc8cdb64025d13c1cc9dad0a0e262\" data-index=\"1\" style=\"float: left; margin: 16px 16px 16px 0;\">\n<script type=\"text\/javascript\"><!--\r\ngoogle_ad_client = \"ca-pub-5825700137064158\";\r\n\/* 250sq, appsweets-blog *\/\r\ngoogle_ad_slot = \"4837931762\";\r\ngoogle_ad_width = 250;\r\ngoogle_ad_height = 250;\r\n\/\/-->\r\n<\/script>\r\n<script type=\"text\/javascript\"\r\nsrc=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">\r\n<\/script>\n<\/div>\n<p>wasavi \u304c\u6b63\u3057\u304f\u30b5\u30ed\u30b2\u30fc\u30c8\u30da\u30a2\u3084\u66f8\u8a18\u7d20\u30af\u30e9\u30b9\u30bf\u3068\u8a00\u3063\u305f\u3001Unicode \u306e\u3081\u3093\u3069\u304f\u3055\u3044\u30c8\u30d4\u30c3\u30af\u3092\u6b63\u3057\u304f\u51e6\u7406\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u305f\u3081\u306b\u306f\u3069\u3053\u3092\u3069\u3046\u76f4\u3057\u305f\u3089\u3044\u3044\u306e\u304b\u8003\u3048\u3066\u3044\u308b\u3002<\/p>\n<p>\u3082\u3061\u308d\u3093\u3001\u3053\u308c\u3089\u306e Unicode \u306e\u3081\u3093\u3069\u304f\u3055\u3044\u90e8\u5206\u304c\u95a2\u308f\u308b\u500b\u5225\u306e\u7b87\u6240\u306b\u500b\u5225\u306e\u51e6\u7406\u3092\u66f8\u304d\u52a0\u3048\u308b\u306e\u306f\u6b63\u3057\u304f\u306a\u3044\u3002\u305d\u308c\u3089\u3092\u7d71\u4e00\u7684\u306b\u51e6\u7406\u3059\u308b\u30af\u30e9\u30b9\u306a\u308a\u95a2\u6570\u3092\u8a2d\u3051\u3066\u3001\u500b\u5225\u306e\u90e8\u5206\u3067\u306f\u5358\u306b\u305d\u308c\u3092\u5229\u7528\u3059\u308b\u3060\u3051\u306b\u3057\u305f\u3044\u3002<\/p>\n<p>\u3053\u3053\u3067\u30011 \u3064\u306e\u30af\u30e9\u30b9\u3092\u4f5c\u3063\u3066\u307f\u305f\u3044\u3002\u3053\u306e\u30af\u30e9\u30b9\u306f\u6587\u5b57\u5217\u3092\u5f15\u6570\u306b\u53d6\u308a\u3001\u30b5\u30ed\u30b2\u30fc\u30c8\u30da\u30a2\u3092\u89e3\u6c7a\u3057\u3064\u3064 UCS4 \u306e\u30b3\u30fc\u30c9\u30dd\u30a4\u30f3\u30c8\u306e\u914d\u5217\u3092\u751f\u6210\u3057\u3001\u3055\u3089\u306b\u305d\u308c\u3092\u66f8\u8a18\u7d20\u30af\u30e9\u30b9\u30bf\u3067\u5206\u5272\u3059\u308b\u3002\u3053\u306e\u30af\u30e9\u30b9\u306f String \u306b\u4f3c\u305f\u30e1\u30bd\u30c3\u30c9\u3092\u6301\u3061\u3001String \u3092\u64cd\u4f5c\u3059\u308b\u3088\u3046\u306b\u66f8\u8a18\u7d20\u30af\u30e9\u30b9\u30bf\u306e\u914d\u5217\u3092\u64cd\u4f5c\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002<\/p>\n<p>\u4f8b\u3048\u3070 Z\u0351\u036b\u0343\u036a\u0302\u036b\u033d\u034f\u0334\u0319\u0324\u031e\u0349\u035a\u032f\u031e\u0320\u034dA\u036b\u0357\u0334\u0362\u0335\u031c\u0330\u0354L\u0368\u0367\u0369\u0358\u0320G\u0311\u0357\u030e\u0305\u035b\u0341\u0334\u033b\u0348\u034d\u0354\u0339O\u0342\u030c\u030c\u0358\u0328\u0335\u0339\u033b\u031d\u0333!\u033f\u030b\u0365\u0365\u0302\u0363\u0310\u0301\u0301\u035e\u035c\u0356\u032c\u0330\u0319\u0317 \u3068\u3044\u3046\u6587\u5b57\u5217\u306f UTF-16 \u306e\u6587\u5b57\u304c 75 \u500b\u3082\u4e26\u3093\u3067\u308b\u8907\u96d1\u306a\u30b7\u30fc\u30b1\u30f3\u30b9\u3060\u3002\u3053\u306e\u4e2d\u304b\u3089 G \u306e\u90e8\u5206\u3060\u3051\u629c\u304d\u51fa\u3059\u3001\u3060\u3068\u304b\u3001\u300c\u30e6\u30fc\u30b6\u304c\u8a8d\u8b58\u3059\u308b\u6587\u5b57\u300d\u306e\u6570\u3001\u3064\u307e\u308a 6 \u3092\u5f97\u308b\u3068\u8a00\u3063\u305f\u51e6\u7406\u306f\u3001String \u306b\u5bfe\u3059\u308b\u64cd\u4f5c\u3067\u306f\u4e0d\u53ef\u80fd\u306a\u306e\u3060\u304c\u3001\u3053\u306e\u30af\u30e9\u30b9\u3092\u4f7f\u3046\u3053\u3068\u3067<\/p>\n<p><code lang=\"javascript\"><br \/>\nvar us = new Unistring(\"Z\u0351\u036b\u0343\u036a\u0302\u036b\u033d\u034f\u0334\u0319\u0324\u031e\u0349\u035a\u032f\u031e\u0320\u034dA\u036b\u0357\u0334\u0362\u0335\u031c\u0330\u0354L\u0368\u0367\u0369\u0358\u0320G\u0311\u0357\u030e\u0305\u035b\u0341\u0334\u033b\u0348\u034d\u0354\u0339O\u0342\u030c\u030c\u0358\u0328\u0335\u0339\u033b\u031d\u0333!\u033f\u030b\u0365\u0365\u0302\u0363\u0310\u0301\u0301\u035e\u035c\u0356\u032c\u0330\u0319\u0317\");<br \/>\nus.length; \/\/ 6 \u304c\u8fd4\u308b<br \/>\nus.substr(3, 1).toString(); \/\/ G\u0311\u0357\u030e\u0305\u035b\u0341\u0334\u033b\u0348\u034d\u0354\u0339 \u304c\u8fd4\u308b<br \/>\nus.charAt(3); \/\/ G \u304c\u8fd4\u308b<br \/>\n<\/code><\/p>\n<p>\u3068\u8a00\u3063\u305f\u3088\u3046\u306b\u7c21\u5358\u306b\u64cd\u4f5c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308b\u3002<\/p>\n<p>\u3068\u3044\u3046\u308f\u3051\u3067\u3001\u66f8\u3044\u3066\u307f\u305f\u3002<\/p>\n<p>\u5b9f\u306f\u3001UTF-16 \u30b7\u30fc\u30b1\u30f3\u30b9\u3092\u66f8\u8a18\u7d20\u30af\u30e9\u30b9\u30bf\u306b\u5206\u5272\u3059\u308b javascript \u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3068\u3044\u3046\u306e\u306f\u3059\u3067\u306b<a href=\"https:\/\/github.com\/orling\/grapheme-splitter\" target=\"_blank\">\u3042\u308b<\/a>\u306e\u3060\u304c\uff08ZALGO! \u3082\u3053\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u304b\u3089\u53d6\u3063\u305f\uff09\u3001\u7d14\u7c8b\u306b\u5206\u5272\u3059\u308b\u3060\u3051\u3067 String \u306b\u4f3c\u305f\u30e1\u30bd\u30c3\u30c9\u7fa4\u306f\u63d0\u4f9b\u3057\u3066\u304f\u308c\u306a\u304b\u3063\u305f\u3002<\/p>\n<div class=\"db9cc8cdb64025d13c1cc9dad0a0e262\" data-index=\"1\" style=\"float: left; margin: 16px 16px 16px 0;\">\n<script type=\"text\/javascript\"><!--\r\ngoogle_ad_client = \"ca-pub-5825700137064158\";\r\n\/* 250sq, appsweets-blog *\/\r\ngoogle_ad_slot = \"4837931762\";\r\ngoogle_ad_width = 250;\r\ngoogle_ad_height = 250;\r\n\/\/-->\r\n<\/script>\r\n<script type=\"text\/javascript\"\r\nsrc=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">\r\n<\/script>\n<\/div>\n\n<div style=\"font-size: 0px; height: 0px; line-height: 0px; margin: 0; padding: 0; clear: both;\"><\/div>","protected":false},"excerpt":{"rendered":"<p>wasavi \u304c\u6b63\u3057\u304f\u30b5\u30ed\u30b2\u30fc\u30c8\u30da\u30a2\u3084\u66f8\u8a18\u7d20\u30af\u30e9\u30b9\u30bf\u3068\u8a00\u3063\u305f\u3001Unicode \u306e\u3081\u3093\u3069\u304f\u3055\u3044\u30c8\u30d4\u30c3\u30af\u3092\u6b63\u3057\u304f\u51e6\u7406\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u305f\u3081\u306b\u306f\u3069\u3053\u3092\u3069\u3046\u76f4\u3057\u305f\u3089\u3044\u3044\u306e\u304b\u8003\u3048\u3066\u3044\u308b\u3002 \u3082\u3061\u308d\u3093\u3001\u3053\u308c\u3089\u306e Unicode \u306e\u3081\u3093\u3069\u304f\u3055\u3044\u90e8\u5206\u304c\u95a2\u308f\u308b\u500b\u5225\u306e\u7b87\u6240\u306b\u500b\u5225\u306e\u51e6\u7406\u3092\u66f8\u304d\u52a0\u3048\u308b\u306e\u306f\u6b63\u3057\u304f\u306a\u3044\u3002\u305d\u308c\u3089\u3092\u7d71\u4e00\u7684\u306b\u51e6\u7406\u3059\u308b\u30af\u30e9\u30b9\u306a\u308a\u95a2\u6570\u3092\u8a2d\u3051\u3066\u3001\u500b\u5225\u306e\u90e8\u5206\u3067\u306f\u5358\u306b\u305d\u308c\u3092\u5229\u7528\u3059\u308b\u3060\u3051\u306b\u3057\u305f\u3044\u3002 \u3053\u3053\u3067\u30011 \u3064\u306e\u30af\u30e9\u30b9\u3092\u4f5c\u3063\u3066\u307f\u305f\u3044\u3002\u3053\u306e\u30af\u30e9\u30b9\u306f\u6587\u5b57\u5217\u3092\u5f15\u6570\u306b\u53d6\u308a\u3001\u30b5\u30ed\u30b2\u30fc\u30c8\u30da\u30a2\u3092\u89e3\u6c7a\u3057\u3064\u3064 UCS4 \u306e\u30b3\u30fc\u30c9\u30dd\u30a4\u30f3\u30c8\u306e\u914d\u5217\u3092\u751f\u6210\u3057\u3001\u3055\u3089\u306b\u305d\u308c\u3092\u66f8\u8a18\u7d20\u30af\u30e9\u30b9\u30bf\u3067\u5206\u5272\u3059\u308b\u3002\u3053\u306e\u30af\u30e9\u30b9\u306f String \u306b\u4f3c\u305f\u30e1\u30bd\u30c3\u30c9\u3092\u6301\u3061\u3001String \u3092\u64cd\u4f5c\u3059\u308b\u3088\u3046\u306b\u66f8\u8a18\u7d20\u30af\u30e9\u30b9\u30bf\u306e\u914d\u5217\u3092\u64cd\u4f5c\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002 \u4f8b\u3048\u3070 Z\u0351\u036b\u0343\u036a\u0302\u036b\u033d\u034f\u0334\u0319\u0324\u031e\u0349\u035a\u032f\u031e\u0320\u034dA\u036b\u0357\u0334\u0362\u0335\u031c\u0330\u0354L\u0368\u0367\u0369\u0358\u0320G\u0311\u0357\u030e\u0305\u035b\u0341\u0334\u033b\u0348\u034d\u0354\u0339O\u0342\u030c\u030c\u0358\u0328\u0335\u0339\u033b\u031d\u0333!\u033f\u030b\u0365\u0365\u0302\u0363\u0310\u0301\u0301\u035e\u035c\u0356\u032c\u0330\u0319\u0317 \u3068\u3044\u3046\u6587\u5b57\u5217\u306f UTF-16 \u306e\u6587\u5b57\u304c 75 \u500b\u3082\u4e26\u3093\u3067\u308b\u8907\u96d1\u306a\u30b7\u30fc\u30b1\u30f3\u30b9\u3060\u3002\u3053\u306e\u4e2d\u304b\u3089 G \u306e\u90e8\u5206\u3060\u3051\u629c\u304d\u51fa\u3059\u3001\u3060\u3068\u304b\u3001\u300c\u30e6\u30fc\u30b6\u304c\u8a8d\u8b58\u3059\u308b\u6587\u5b57\u300d\u306e\u6570\u3001\u3064\u307e\u308a 6 \u3092\u5f97\u308b\u3068\u8a00\u3063\u305f\u51e6\u7406\u306f\u3001String \u306b\u5bfe\u3059\u308b\u64cd\u4f5c\u3067\u306f\u4e0d\u53ef\u80fd\u306a\u306e\u3060\u304c\u3001\u3053\u306e\u30af\u30e9\u30b9\u3092\u4f7f\u3046\u3053\u3068\u3067 var us = new Unistring(&#8220;Z\u0351\u036b\u0343\u036a\u0302\u036b\u033d\u034f\u0334\u0319\u0324\u031e\u0349\u035a\u032f\u031e\u0320\u034dA\u036b\u0357\u0334\u0362\u0335\u031c\u0330\u0354L\u0368\u0367\u0369\u0358\u0320G\u0311\u0357\u030e\u0305\u035b\u0341\u0334\u033b\u0348\u034d\u0354\u0339O\u0342\u030c\u030c\u0358\u0328\u0335\u0339\u033b\u031d\u0333!\u033f\u030b\u0365\u0365\u0302\u0363\u0310\u0301\u0301\u035e\u035c\u0356\u032c\u0330\u0319\u0317&#8221;); us.length; \/\/ 6 \u304c\u8fd4\u308b us.substr(3, 1).toString(); \/\/ G\u0311\u0357\u030e\u0305\u035b\u0341\u0334\u033b\u0348\u034d\u0354\u0339 \u304c\u8fd4\u308b us.charAt(3); &hellip; <a href=\"https:\/\/appsweets.net\/blog\/2015\/09\/25\/handling-unicode\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[5,3,4],"class_list":["post-1751","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-javascript","tag-vi","tag-wasavi"],"_links":{"self":[{"href":"https:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/posts\/1751","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/comments?post=1751"}],"version-history":[{"count":1,"href":"https:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/posts\/1751\/revisions"}],"predecessor-version":[{"id":1752,"href":"https:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/posts\/1751\/revisions\/1752"}],"wp:attachment":[{"href":"https:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/media?parent=1751"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/categories?post=1751"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/tags?post=1751"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}