We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fcc0f44 commit 09d98cbCopy full SHA for 09d98cb
src/test/java/com/fasterxml/jackson/dataformat/xml/ser/TestCharset.java
@@ -2,6 +2,7 @@
2
3
import com.fasterxml.jackson.dataformat.xml.XmlMapper;
4
import com.fasterxml.jackson.dataformat.xml.XmlTestBase;
5
+import com.fasterxml.jackson.dataformat.xml.XmlWriter;
6
7
import java.io.IOException;
8
import java.nio.charset.Charset;
@@ -45,7 +46,8 @@ public void testBig5ObjectWriter() throws IOException
45
46
stringBean.象形字 = "pictogram";
47
XmlMapper xmlMapper = new XmlMapper();
48
xmlMapper.configure(ToXmlGenerator.Feature.WRITE_XML_1_1, true);
- byte[] xml = xmlMapper.writer().writeValueAsBytes(stringBean);
49
+ XmlWriter writer = (XmlWriter) xmlMapper.writer();
50
+ byte[] xml = writer.writeValueAsBytes(stringBean, big5);
51
System.out.write(xml);
52
System.out.println();
53
}
0 commit comments