https://issues.apache.org/bugzilla/show_bug.cgi?id=52579

--- Comment #2 from Konstantin Kolinko <knst.koli...@gmail.com> 2012-02-02 
11:00:11 UTC ---
Created attachment 28252
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=28252
Test.java - Test Charset.decode()

I am attaching a test class that I wrote based on reproduction scenario in bug
6196991 + charset enumeration code from r1140904.

This test prints names of charsets that cannot perform encoding+decoding
roundtrip for single "A" character.


Here is the list of charsets that are affected by this issue,
tested with 1.5.0_20-b02, on Windows:
---
Big5
Big5-HKSCS
EUC-JP
EUC-KR
GB2312
GBK
ISO-2022-JP
JIS_X0212-1990
Shift_JIS
windows-31j
+ two dozens of non-standard charsets whose names start with "x-"
---

With 1.4.2_19-b04 on Windows the list is the same less GB2312 which is absent.

With 1.6.0_30-b12 on Windows the list contains this only charset:
----
JIS_X0212-1990
+ 4 non-standard charsets whose names start with "x-"
----

So:
1. The issue is indeed a bug in JRE.

It is present in latest public versions of 1.4 and 1.5 that I have. I do not
know anything about later "Java for business" versions.

2. The issue is absent in Oracle/Sun JDK 1.6.30.

3. The issue affects only certain encodings.

If you can update your configuration and applications to use UTF-8, you would
avoid this issue.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to