You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to assertions that assume that Charset.defaultCharset() will return UTF-8.
For example (testToJsonObjectTypeWriter) fails with the following when run on z/OS with a default character encoding of IBM-1047:
Failed to marshal using Jsonb.toJson method with Object, Type and Writer arguments.
Expected: a string matching the pattern '\{\s*"instance"\s*:\s*"Test"\s*}'
but: was "�����������z�ㅢ���"
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
at ee.jakarta.tck.json.bind.api.jsonb.JsonbTest.testToJsonObjectTypeWriter(JsonbTest.java:221)
new OutputStreamWriter(stream) will return a Writer with a character encoding of IBM-1047.
Then we try to create a string where the bytes are encoded using IBM-1047 but we decode it using UTF-8 resulting in:
�����������z�ㅢ���
The text was updated successfully, but these errors were encountered:
When running the TCK on an OS/JDK combination that uses a different character encoding other than UTF-8 the following tests fail:
Due to assertions that assume that Charset.defaultCharset() will return
UTF-8
.For example (testToJsonObjectTypeWriter) fails with the following when run on z/OS with a default character encoding of
IBM-1047
:If we look at this test:
https://github.com/jakartaee/jsonb-api/blob/master/tck/src/main/java/ee/jakarta/tck/json/bind/api/jsonb/JsonbTest.java#L215-L224
new OutputStreamWriter(stream)
will return a Writer with a character encoding ofIBM-1047
.Then we try to create a string where the bytes are encoded using
IBM-1047
but we decode it usingUTF-8
resulting in:�����������z�ㅢ���
The text was updated successfully, but these errors were encountered: