{"id":2026,"date":"2013-12-27T07:44:34","date_gmt":"2013-12-26T22:44:34","guid":{"rendered":"http:\/\/www.techscore.com\/blog\/?p=2026"},"modified":"2018-11-14T16:33:53","modified_gmt":"2018-11-14T07:33:53","slug":"java1-5-x-tomcat6-0-x-%e3%81%ae%e7%89%b9%e5%ae%9a%e3%81%ae%e7%b5%84%e3%81%bf%e5%90%88%e3%82%8f%e3%81%a71%e3%83%90%e3%82%a4%e3%83%88%e3%81%ae%e6%96%87%e5%ad%97%e3%81%8c%e7%a9%ba%e7%99%bd%e3%81%ab","status":"publish","type":"post","link":"https:\/\/www.techscore.com\/blog\/2013\/12\/27\/java1-5-x-tomcat6-0-x-%e3%81%ae%e7%89%b9%e5%ae%9a%e3%81%ae%e7%b5%84%e3%81%bf%e5%90%88%e3%82%8f%e3%81%a71%e3%83%90%e3%82%a4%e3%83%88%e3%81%ae%e6%96%87%e5%ad%97%e3%81%8c%e7%a9%ba%e7%99%bd%e3%81%ab\/","title":{"rendered":"Java1.5.x +Tomcat6.0.x \u306e\u7279\u5b9a\u306e\u7d44\u307f\u5408\u308f\u30671\u30d0\u30a4\u30c8\u306e\u6587\u5b57\u304c\u7a7a\u767d\u306b\u306a\u308b\u554f\u984c"},"content":{"rendered":"<p>\u3053\u3093\u306b\u3061\u308f\u3001\u5317\u5ddd\u3067\u3059\u3002<\/p>\n<p>\u4ee5\u524d\u3001Java1.5.x + Tomcat6.0.x \u306e\u7279\u5b9a\u306e\u7d44\u307f\u5408\u308f\u305b\u3001\u7279\u5b9a\u306e\u6761\u4ef6\u4e0b\u3067 1\u30d0\u30a4\u30c8\u306e\u6587\u5b57\u304c\u7a7a\u767d\u306b\u306a\u308b<br \/>\n\u3068\u3044\u3046\u554f\u984c\u306b\u906d\u9047\u3057\u305f\u306e\u3067 tomcat users ML \u306b\u78ba\u8a8d\u3057\u305f\u3053\u3068\u304c\u3042\u308a\u307e\u3057\u305f\u3002<br \/>\n\u5148\u65e5\u3001Tomcat6 \u306e RELEASE-NOTES \u3092\u898b\u3066\u3044\u308b\u3068\u540c\u69d8\u306e\u554f\u984c\u306b\u95a2\u3057\u3066\u6ce8\u610f\u66f8\u304d\u304c\u3042\u308a<br \/>\n\u81ea\u5206\u3067\u3082\u5fd8\u308c\u3066\u3044\u308b\u306e\u5099\u5fd8\u9332\u3068\u3057\u3066\u8a18\u8f09\u3057\u3066\u304a\u304d\u307e\u3059\uff01<\/p>\n<p>RELEASE-NOTES\u304b\u3089\u629c\u7c8b<br \/>\n<a href=\"http:\/\/ftp.meisei-u.ac.jp\/mirror\/apache\/dist\/tomcat\/tomcat-6\/v6.0.37\/RELEASE-NOTES\" target=\"_blank\">http:\/\/ftp.meisei-u.ac.jp\/mirror\/apache\/dist\/tomcat\/tomcat-6\/v6.0.37\/RELEASE-NOTES<\/a><\/p>\n<p>============================================<br \/>\nMulti-byte charset handling bug in Java 1.5:<br \/>\n============================================<br \/>\nPublic versions of Sun\/Oracle Java 1.5 are known to have a nasty bug in<br \/>\nimplementation of Charset.decode() method for certain character sets.<\/p>\n<p>For details, test and a list of affected character sets see:<\/p>\n<p>http:\/\/bugs.sun.com\/bugdatabase\/view_bug.do?bug_id=6196991<br \/>\nhttps:\/\/issues.apache.org\/bugzilla\/show_bug.cgi?id=52579<\/p>\n<p>The UTF-8 charset is not affected by this issue.<\/p>\n<h2>\u539f\u56e0<\/h2>\n<p>java.nio.charset.Charset.decode() \u30e1\u30bd\u30c3\u30c9\u3092\u5229\u7528\u3057\u305f\u5834\u5408 EUC-JP\u3084Shift_JIS,windows-31j\u306a\u3069\u7279\u5b9a\u306e\u6587\u5b57\u30b3\u30fc\u30c9\u306e\u5834\u5408\u30011\u30d0\u30a4\u30c8\u6587\u5b57\u3092\u30c7\u30b3\u30fc\u30c9\u3059\u308b\u3068\u7a7a\u6587\u5b57\u306b\u30c7\u30b3\u30fc\u30c9\u3055\u308c\u308b\u3068\u3044\u3046\u554f\u984c\u304c\u3042\u308a\u307e\u3057\u305f\u3002<\/p>\n<p><a href=\"http:\/\/bugs.sun.com\/bugdatabase\/view_bug.do?bug_id=6196991\" title=\"http:\/\/bugs.sun.com\/bugdatabase\/view_bug.do?bug_id=6196991\" target=\"_blank\">http:\/\/bugs.sun.com\/bugdatabase\/view_bug.do?bug_id=6196991<\/a><\/p>\n<p>\u3053\u306e\u554f\u984c\u306f\u3001java1.6 \u53ca\u3073 java 1.5.35 b31 \u3067\u4fee\u6b63\u3055\u308c\u3066\u3044\u307e\u3059\u3002<br \/>\n<a href=\"http:\/\/www.oracle.com\/technetwork\/java\/javase\/documentation\/overview-137139.html#5.0u35-rev-b31\" title=\"http:\/\/www.oracle.com\/technetwork\/java\/javase\/documentation\/overview-137139.html#5.0u35-rev-b31\" target=\"_blank\">http:\/\/www.oracle.com\/technetwork\/java\/javase\/documentation\/overview-137139.html#5.0u35-rev-b31<\/a><\/p>\n<p>tomcat6.0.36\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u78ba\u8a8d\u3057\u3066\u307f\u308b\u3068\u3001 decode\u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3073\u51fa\u3057\u3066\u3044\u308b\u7b87\u6240\u304c\u3042\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\/apache-tomcat-6.0.36-src\/trunk\/java\/org\/apache\/tomcat\/util\/buf\/ByteChunk.java<\/p>\n<pre class=\"lang:java decode:true \">    public String toStringInternal() {\r\n        if (charset == null) {\r\n            charset = DEFAULT_CHARSET;\r\n        }\r\n        \/\/ new String(byte[], int, int, Charset) takes a defensive copy of the\r\n        \/\/ entire byte array. This is expensive if only a small subset of the\r\n        \/\/ bytes will be used. The code below is from Apache Harmony.\r\n        CharBuffer cb;\r\n        cb = charset.decode(ByteBuffer.wrap(buff, start, end-start));\r\n        return new String(cb.array(), cb.arrayOffset(), cb.length());\r\n    }<\/pre>\n<p>\u30b3\u30df\u30c3\u30c8\u30ed\u30b0\u3092\u78ba\u8a8d\u3057\u3066\u307f\u308b\u3068\u30016.0.33 \u306e\u4fee\u6b63\u3067\u4e0a\u8a18\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u5229\u7528\u3059\u308b\u3088\u3046\u306b\u4fee\u6b63\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u5bfe\u8c61\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u3001 Tomcat \u306e web.xml \u3067 filters.SetCharacterEncodingFilter \u3092\u8a2d\u5b9a\u3059\u308b\u3068\u547c\u3073\u51fa\u3055\u308c\u308b\u306e\u3067\u3001<br \/>\nTomcat\u306b\u4ed8\u5c5e\u3057\u3066\u3044\u308b\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u3082\u518d\u73fe\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>\u539f\u56e0\u306f\u3001Java \u306e Bug \u306b\u3088\u308b\u3082\u306e\u3067\u3059\u3002<br \/>\nJava 1.5.35 b31 \u672a\u6e80\u3068Tomcat6.0.33 \u4ee5\u4e0a\u306e\u7d44\u307f\u5408\u308f\u305b\u3067\u767a\u751f\u3057\u307e\u3059\u306e\u3067\u5bfe\u5fdc\u3055\u308c\u305f\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u5229\u7528\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u3093\u306b\u3061\u308f\u3001\u5317\u5ddd\u3067\u3059\u3002<\/p>\n<p>\u4ee5\u524d\u3001Java1.5.x + Tomcat6.0.x \u306e\u7279\u5b9a\u306e\u7d44\u307f\u5408\u308f\u305b\u3001\u7279\u5b9a\u306e\u6761\u4ef6\u4e0b\u3067 1\u30d0\u30a4\u30c8\u306e\u6587\u5b57\u304c\u7a7a\u767d\u306b\u306a\u308b<br \/>\n\u3068\u3044\u3046\u554f\u984c\u306b\u906d\u9047\u3057\u305f\u306e\u3067 tomcat users ML \u306b\u78ba\u8a8d\u3057\u305f\u3053\u3068\u304c\u3042\u308a\u307e\u3057\u305f\u3002<br \/><a href=\"https:\/\/www.techscore.com\/blog\/2013\/12\/27\/java1-5-x-tomcat6-0-x-%e3%81%ae%e7%89%b9%e5%ae%9a%e3%81%ae%e7%b5%84%e3%81%bf%e5%90%88%e3%82%8f%e3%81%a71%e3%83%90%e3%82%a4%e3%83%88%e3%81%ae%e6%96%87%e5%ad%97%e3%81%8c%e7%a9%ba%e7%99%bd%e3%81%ab\/\">\u7d9a\u304d\u3092\u8aad\u3080...<\/a><\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[18],"tags":[57,72],"_links":{"self":[{"href":"https:\/\/www.techscore.com\/blog\/wp-json\/wp\/v2\/posts\/2026"}],"collection":[{"href":"https:\/\/www.techscore.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.techscore.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.techscore.com\/blog\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.techscore.com\/blog\/wp-json\/wp\/v2\/comments?post=2026"}],"version-history":[{"count":1,"href":"https:\/\/www.techscore.com\/blog\/wp-json\/wp\/v2\/posts\/2026\/revisions"}],"predecessor-version":[{"id":17892,"href":"https:\/\/www.techscore.com\/blog\/wp-json\/wp\/v2\/posts\/2026\/revisions\/17892"}],"wp:attachment":[{"href":"https:\/\/www.techscore.com\/blog\/wp-json\/wp\/v2\/media?parent=2026"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techscore.com\/blog\/wp-json\/wp\/v2\/categories?post=2026"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techscore.com\/blog\/wp-json\/wp\/v2\/tags?post=2026"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}