微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

]解决JBPM图形流程设计器的gpd.xml文件的中文乱码问题

[jbpm]解决JBPM图形流程设计器的gpd.xml文件中文乱码问题2008-05-31 20:51

JBPM图形流程设计器是eclipse插件,最近我的电脑上用它设计出的流程只要是中文,那么就会在gpd.xml是显示是乱码。
经过检验与搜索,确认此问题为设计器的问题。
环境:eclipse 3.3.2 jee版的,字符集设置成utf-8,设计器jpdl_3.1.0.SP1。

解决办法:org.jbpm.gd.jpdl_3.1.0.SP1里面有个文件ui.jar,反编译类org.jbpm.gd.common.editor.AbstractContentProvider.class,修改两个地方。
1、
找到:new ByteArrayInputStream(toNotationInfoXml(rootContainer).getBytes()),true,null);,
改成:new ByteArrayInputStream(toNotationInfoXml(rootContainer).getBytes("UTF-8")),null);
2、
找到:InputStreamReader inputstreamreader = new InputStreamReader(ifile.getContents());
Element notationInfo = new SAXReader().read(reader).getRootElement();,
改成InputStreamReader inputstreamreader = new InputStreamReader(ifile.getContents(),"UTF-8"); Element notationInfo = new SAXReader().read(reader).getRootElement();

重新编译再打入ui.jar包就OK了,说白了就是设置编码UTF-8就OK了。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。