{"id":4694,"date":"2010-09-02T12:38:29","date_gmt":"2010-09-02T03:38:29","guid":{"rendered":"http:\/\/fukata.org\/?p=4694"},"modified":"2017-08-11T22:58:50","modified_gmt":"2017-08-11T22:58:50","slug":"get-current-page-charset-each-browser-by-js","status":"publish","type":"post","link":"https:\/\/blog.fukata.org\/archives\/4694\/","title":{"rendered":"js\u3067\u73fe\u5728\u30da\u30fc\u30b8\u306e\u6587\u5b57\u30b3\u30fc\u30c9\u53d6\u5f97\uff0f\u5404\u30d6\u30e9\u30a6\u30b6\u3067\u306e\u5024\u306e\u9055\u3044"},"content":{"rendered":"

\u3072\u3087\u3093\u306a\u3053\u3068\u304b\u3089\u3001js\u304b\u3089\u73fe\u5728\u306e\u30da\u30fc\u30b8\u3067\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u6587\u5b57\u30b3\u30fc\u30c9\u3092\u53d6\u5f97\u3059\u308b\u5fc5\u8981\u304c\u51fa\u305f\u306e\u3067\u3001\u73fe\u5728\u4e3b\u8981\u306a\u30d6\u30e9\u30a6\u30b6\u3067\u306e\u5024\u3092\u8abf\u3079\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n

\u3061\u306a\u307f\u306b\u3001\u53d6\u5f97\u3059\u308b\u306e\u306b\u4f7f\u7528\u3057\u305f\u30b3\u30fc\u30c9\u306f\u4e0b\u8a18\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n

\r\nif (document.all) {\r\n\talert(document.charset);\r\n} else {\r\n\talert(document.characterSet);\r\n}\r\n<\/pre>\n

\u524d\u63d0\u6761\u4ef6\u3068\u3057\u3066\u3001meta\u30bf\u30b0\u3068\u3057\u3066\u4e0b\u8a18\u306e\u3088\u3046\u306b\u6307\u5b9a\u3055\u308c\u305f\u6587\u5b57\u30b3\u30fc\u30c9\u3068\u30d5\u30a1\u30a4\u30eb\u306e\u6587\u5b57\u30b3\u30fc\u30c9\u306f\u4e00\u81f4\u3055\u305b\u3066\u3044\u307e\u3059\u3002<\/p>\n

\r\n\r\n<\/pre>\n

\u5404\u30d6\u30e9\u30a6\u30b6\u306e\u7d50\u679c\u306f\u4e0b\u8a18\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n\n\n\n\n\n\n\n
Browser\/
\nCharset<\/th>\n
UTF-8<\/th>\nutf-8<\/th>\nutf8<\/th>\nShift_JIS<\/th>\nshift_jis<\/th>\nsjis<\/th>\nEUC-JP<\/th>\neuc-jp<\/th>\neuc_jp<\/th>\n<\/tr>\n
Win
\nIE8<\/th>\n
utf-8<\/td>\nutf-8<\/td>\nshift_jis<\/td>\nshift_jis<\/td>\nshift_jis<\/td>\nshift_jis<\/td>\neuc-jp<\/td>\neuc-jp<\/td>\nshift_jis<\/td>\n<\/tr>\n
Win
\nFF3.6<\/th>\n
UTF-8<\/td>\nUTF-8<\/td>\nUTF-8<\/td>\nShift_JIS<\/td>\nShift_JIS<\/td>\nShift_JIS<\/td>\nEUC-JP<\/td>\nEUC-JP<\/td>\nShift_JIS<\/td>\n<\/tr>\n
Win
\nChrome<\/th>\n
UTF-8<\/td>\nUTF-8<\/td>\nUTF-8<\/td>\nShift_JIS<\/td>\nShift_JIS<\/td>\nShift_JIS<\/td>\nEUC-JP<\/td>\nEUC-JP<\/td>\nEUC-JP<\/td>\n<\/tr>\n
Win
\nOpera 10.61<\/th>\n
utf-8<\/td>\nutf-8<\/td>\nutf-8<\/td>\nshift_jis<\/td>\nshift_jis<\/td>\nshift_jis<\/td>\neuc-jp<\/td>\neuc-jp<\/td>\nshift_jis<\/td>\n<\/tr>\n
Win
\nSafari 5.0.1<\/th>\n
UTF-8<\/td>\nUTF-8<\/td>\nUTF-8<\/td>\nShift_JIS<\/td>\nShift_JIS<\/td>\nShift_JIS<\/td>\nEUC-JP<\/td>\nEUC-JP<\/td>\nEUC-JP<\/td>\n<\/tr>\n
Ubuntu
\nChrome<\/th>\n
UTF-8<\/td>\nUTF-8<\/td>\nUTF-8<\/td>\nShift_JIS<\/td>\nShift_JIS<\/td>\nShift_JIS<\/td>\nEUC-JP<\/td>\nEUC-JP<\/td>\nEUC-JP<\/td>\n<\/tr>\n
Ubuntu
\nFF3.6<\/th>\n
UTF-8<\/td>\nUTF-8<\/td>\nUTF-8<\/td>\nShift_JIS<\/td>\nShift_JIS<\/td>\nShift_JIS<\/td>\nEUC-JP<\/td>\nEUC-JP<\/td>\nShift_JIS<\/td>\n<\/tr>\n
Ubuntu
\nOpera 10.61<\/th>\n
utf-8<\/td>\nutf-8<\/td>\nutf-8<\/td>\nshift_jis<\/td>\nshift_jis<\/td>\nshift_jis<\/td>\neuc-jp<\/td>\neuc-jp<\/td>\nshift_jis<\/td>\n<\/tr>\n<\/table>\n

euc_jp\u3092\u6307\u5b9a\u3057\u305f\u5834\u5408\u306b\u82e5\u5e72\u30d6\u30e9\u30a6\u30b6\u9593\u3067\u6319\u52d5\u304c\u7570\u306a\u308b\u3088\u3046\u3067\u3059\u306d\u3002
\n\u307e\u305f\u3001IE8\u3067\u306eutf8\u3092\u6307\u5b9a\u3057\u305f\u969b\u306bshift_jis\u304c\u623b\u3063\u3066\u304d\u305f\u306e\u3082\u6c17\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u3072\u3087\u3093\u306a\u3053\u3068\u304b\u3089\u3001js\u304b\u3089\u73fe\u5728\u306e\u30da\u30fc\u30b8\u3067\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u6587\u5b57\u30b3\u30fc\u30c9\u3092\u53d6\u5f97\u3059\u308b\u5fc5\u8981\u304c\u51fa\u305f\u306e\u3067\u3001\u73fe\u5728\u4e3b\u8981\u306a\u30d6\u30e9\u30a6\u30b6\u3067\u306e\u5024\u3092\u8abf\u3079\u3066\u307f\u307e\u3057\u305f\u3002 \u3061\u306a\u307f\u306b\u3001\u53d6\u5f97\u3059\u308b\u306e\u306b\u4f7f\u7528\u3057\u305f\u30b3\u30fc\u30c9\u306f\u4e0b\u8a18\u306b\u306a\u308a\u307e\u3059\u3002 if (d … \u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":2,"featured_media":9223372036854775807,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1980],"tags":[800,799],"_links":{"self":[{"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/posts\/4694"}],"collection":[{"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/comments?post=4694"}],"version-history":[{"count":0,"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/posts\/4694\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/media\/9223372036854775807"}],"wp:attachment":[{"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/media?parent=4694"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/categories?post=4694"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/tags?post=4694"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}