[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了。 (编辑:李大同)
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!
|