diff --git a/checkstyle_suppressions.xml b/checkstyle_suppressions.xml
index 2a88e896a6..b84cdfc765 100644
--- a/checkstyle_suppressions.xml
+++ b/checkstyle_suppressions.xml
@@ -50,7 +50,10 @@
+
+
+
diff --git a/src/test/java/org/htmlunit/javascript/host/xml/AbstractXMLHttpRequestEncodingTest.java b/src/test/java/org/htmlunit/javascript/host/xml/AbstractXMLHttpRequestEncodingTest.java
index d19baf41a1..b97b1cee2a 100644
--- a/src/test/java/org/htmlunit/javascript/host/xml/AbstractXMLHttpRequestEncodingTest.java
+++ b/src/test/java/org/htmlunit/javascript/host/xml/AbstractXMLHttpRequestEncodingTest.java
@@ -19,6 +19,7 @@
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
+import java.util.Locale;
import org.apache.commons.io.ByteOrderMark;
import org.apache.commons.lang3.ArrayUtils;
@@ -44,6 +45,8 @@ public enum TestCharset {
UTF8("UTF8", UTF_8),
/** iso 8859 1. */
ISO88591("ISO88591", ISO_8859_1),
+ /** windows-1250. */
+ WINDOWS1250("WINDOWS1250", Charset.forName("windows-1250")),
/** gb 2312. */
GB2312("GB2312", Charset.forName("GB2312"));
@@ -114,4 +117,12 @@ protected void setupXmlResponse(final String xml, final String bom, final TestMi
getMockWebConnection().setResponse(URL_SECOND, xml, mimeTypeXml.getMimeType(),
charsetXmlResponseHeader == null ? null : charsetXmlResponseHeader.getCharset());
}
+
+ protected static String escape(final String str) {
+ final StringBuilder res = new StringBuilder();
+ for (final char c : str.toCharArray()) {
+ res.append("\\u").append(String.format("%04X", (int) c).toLowerCase(Locale.ROOT));
+ }
+ return res.toString();
+ }
}
diff --git a/src/test/java/org/htmlunit/javascript/host/xml/XMLHttpRequestResponseAsTextEncodingTest.java b/src/test/java/org/htmlunit/javascript/host/xml/XMLHttpRequestResponseAsTextEncodingTest.java
index abeb7ab3b5..665836a443 100644
--- a/src/test/java/org/htmlunit/javascript/host/xml/XMLHttpRequestResponseAsTextEncodingTest.java
+++ b/src/test/java/org/htmlunit/javascript/host/xml/XMLHttpRequestResponseAsTextEncodingTest.java
@@ -46,10 +46,10 @@ public static Collection