[英]windowbuilder xwt design MalformedByteSequenceException: Invalid byte of UTF-8 sequence
The problem is: When we are trying to use russian characters in xml-attributes in .xwt file (label text for instance) WindowBuilder design view crashes with error: 问题是:当我们尝试在.xwt文件(例如,标签文本)的xml属性中使用俄语字符时,WindowBuilder设计视图因错误而崩溃:
com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 2 of 3-byte UTF-8 sequence. com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException:3字节UTF-8序列的无效字节2。
It seems, that xml parser crashes because of the file encoding. 看来,xml解析器由于文件编码而崩溃。
The problem is solved. 问题已经解决了。 WindowBuilder passes IOUtils.toInputStream(xwt_file_content) to XWTParser.
WindowBuilder将IOUtils.toInputStream(xwt_file_content)传递给XWTParser。 XWTParser expects UTF8 encoded stream, but your Eclipse IDE uses default system encoding.
XWTParser需要UTF8编码的流,但是您的Eclipse IDE使用默认的系统编码。 Add JVM argument -Dfile.encoding=UTF8 to eclipse.ini.
将JVM参数-Dfile.encoding = UTF8添加到eclipse.ini。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.