RFR: 8195686: ISO-8859-8-i charset cannot be decoded, should be mapped to ISO-8859-8
Pratiksha.Sawant
duke at openjdk.org
Fri Aug 23 11:10:03 UTC 2024
On Fri, 23 Aug 2024 10:38:38 GMT, Pratiksha.Sawant <duke at openjdk.org> wrote:
> Mapping ISO-8859-8-I charset to ISO-8859-8.
> Below mentioned 2 aliases are added as part of this:-
> **ISO-8859-8-I**
> **ISO8859-8-I**
>
> The bug report for the same:- https://bugs.openjdk.org/browse/JDK-8195686
I have attached a test case for the charset issue.
Without the charset fix, below issue is seen:
ISO-8859-8I charset testing
ISO-8859-8 bytes: 1C 1E DF FE 3F FD
Exception in thread "main" java.io.UnsupportedEncodingException: ISO-8859-8-I
at java.base/java.lang.String.lookupCharset(String.java:861)
at java.base/java.lang.String.getBytes(String.java:1795)
at iso88598.main(iso88598.java:8)
After applying the fix, able to decode characters using **ISO-8859-8-I** charset.
ISO-8859-8I charset testing
ISO-8859-8 bytes: 1C 1E DF FE 3F FD
ISO-8859-8-I bytes: 1C 1E DF FE 3F FD
ISO8859-8-I bytes: 1C 1E DF FE 3F FD
[iso88598.txt](https://github.com/user-attachments/files/16727747/iso88598.txt)
@jaikiran, could you please review my PR.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/20690#issuecomment-2306856630
PR Comment: https://git.openjdk.org/jdk/pull/20690#issuecomment-2306859247
More information about the build-dev
mailing list