[英]Java Digester for UTF-8
how to set encoding type of digester in java.Please help 如何在Java中设置摘要的编码类型。请帮助
because I have set the encoding type in xml while parsing using digester finally it gives string something like bytes(grnlநீ00) instead of UTF-8 string. 因为我在使用摘要器进行解析时在xml中设置了编码类型,所以最终它给出的字符串类似于byte(grnlà®00),而不是UTF-8字符串。
Is there any possibility to set Encoding type in parser like this ? 是否有可能像这样在解析器中设置Encoding类型?
digester.addBeanPropertySetter("ECnetGRN/TRANSDATE", "transdate" );--set UTF-8
I do it this way: 我这样做:
InputStreamReader is = new InputStreamReader(new FileInputStream("name.xml", "UTF-8");
digester.parse(is);
我猜您可以将编码设置为传递到摘要器的输入流(xml输入),这会很小心。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.