以文本方式查看主题

-  中文XML论坛 - 专业的XML技术讨论区  (http://bbs.xml.org.cn/index.asp)
--  『 Semantic Web(语义Web)/描述逻辑/本体 』  (http://bbs.xml.org.cn/list.asp?boardid=2)
----  郁闷中 protege3.0 不支持中文。。。(admin注:解决方法见11楼)  (http://bbs.xml.org.cn/dispbbs.asp?boardid=2&rootid=&id=11634)


--  作者:sleepyboy
--  发布时间:11/6/2004 4:57:00 PM

--  郁闷中 protege3.0 不支持中文。。。(admin注:解决方法见11楼)
如题 郁闷中 不多写了 求解决方法


[此贴子已经被admin于2007-4-4 23:56:00编辑过]

--  作者:saleemlz
--  发布时间:11/6/2004 7:54:00 PM

--  
自己写plug-in,怎么样
--  作者:sleepyboy
--  发布时间:11/7/2004 7:45:00 PM

--  
怎么写 那里有接口?? 给点提示呀 我估计不是很困难的
--  作者:nybon
--  发布时间:11/8/2004 7:58:00 AM

--  
为什么我觉得好像可以支持呢?我用J2SE 5.0, Protege 3.0 beta build 95,试了一下,好像可以的嘛,Project->Encoding里面Default是UTF-8,Locale是Chinese(China),Read Override不知道什么意思,选一个GB2312好了,我创建一个owl project,编辑的时候可以显示中文,save了以后owl文件用文本编辑器打开也可以显示中文的啊.不过我没试太多就是了,所以不能完全确定.你是怎么做的呢,运行环境是什么?
--  作者:nybon
--  发布时间:11/8/2004 8:17:00 AM

--  
在owl project菜单的Code里面show source code是乱码,这个似乎是owl plugin不支持中文而不是Protege不支持,但是最后project保存的结果还是正常的我这里,只要最后结果没错应该就没问题了吧
--  作者:sleepyboy
--  发布时间:11/8/2004 11:08:00 AM

--  
晕 为什么我的下拉列表里没有gb2312
--  作者:nybon
--  发布时间:11/8/2004 12:27:00 PM

--  
Encodings

此主题相关图片如下:
按此在新窗口浏览图片
Protege Start

此主题相关图片如下:
按此在新窗口浏览图片
--  作者:nybon
--  发布时间:11/8/2004 12:31:00 PM

--  
你用的JRE什么版本的,换J2SE 5.0试试看,可能中文支持好点吧
--  作者:ChouBill
--  发布时间:11/8/2004 2:13:00 PM

--  
在我的Protege中,是这样的
CONFIG: Protege 3.0 Build 82, JVM 1.4.0-b92, memory=167M, Windows 2000, encoding
=UTF-8, language=zh, country=CN,
在这样的配置下,viewSourceCode就是乱码,如何改变Protege的配置,使之不要用UTF-8,而是用GB2312?

--  作者:sleepyboy
--  发布时间:11/8/2004 4:17:00 PM

--  
在xp下什么都没设置也没有gb2312 就可以显示中文 98下就不行 和楼上差不多  哎
--  作者:nybon
--  发布时间:11/17/2004 9:27:00 AM

--  
我到Protege Mailing List上问了一下,改变encoding应该是可以的,在Protege安装目录下的protege.lax文件中加上一行:protege.file.encoding=GBK,这个是针对3.0 beta版的,如果是2.1.2的话应该加上Dfile.encoding=GBK,然后每次通过Protege.exe运行的话默认编码就变成GBK了,这两个版本我都试过了,确实能够改变默认编码(我用J2SE 5.0,其他的JVM不知道)其他编码应该类同,没有都试过我.
但是Protege对中文的支持没问题,因为UTF-8是支持中文的(这点我觉得是没问题,不过不知道楼上的几位为什么好像有问题),而且Protege的developer不赞成改变编码,要处理的话应该是用Java IO里面的InputStreamReader和OutputStreamWriter来改变编码为UTF-8来读写文件,就不会出现乱码了(呃,这个是我说的,不是他说的,读写文件是没问题,但是我输出到标准输出流在Eclipse里面的控制台就无法看懂了,因为Eclipse在Windows下用的是GBK编码)
--  作者:nybon
--  发布时间:11/17/2004 9:29:00 AM

--  
Protege 3.0 beta Start:

此主题相关图片如下:
按此在新窗口浏览图片

Protege Encoding:

此主题相关图片如下:
按此在新窗口浏览图片


--  作者:nybon
--  发布时间:11/17/2004 9:32:00 AM

--  
最后的回复:
From this message and your follow up messages it would appear to me
that the file is in fact correctly encoded as UTF-8 but that you simply
don't want UTF-8.  In Protege 3.0 to use another encoding you set the
parameter
protege.file.encoding=GBK

(This parameter was changed between releases because Sun does not
support modifying the file.encoding parameter in this way and different
VM's give different behavior when you do so.)

After you do this, read in the file and write it back out.  The RDF
files should now have GBK listed at the top of the file as the encoding
and that should be the encoding actually used in the file.

You need to be sure to use the protege 3.0 beta version of the RDF
backend (it comes with the full release) or none of this will work
correctly.  Using the 2.1 RDF backend with 3.0 will give garbage.

Ray


--  作者:nybon
--  发布时间:11/17/2004 9:37:00 AM

--  
[URL=http://protege.stanford.edu/doc/file_encodings.html]Protege FAQ about Encoding[/URL]
--  作者:nyh9904
--  发布时间:11/18/2004 3:05:00 PM

--  
这个问题按前面几位所说可以解决了,但当使用web protege pluge 时候,又出现乱码?如果解决?谢谢

--  作者:nybon
--  发布时间:11/19/2004 9:56:00 PM

--  
没用过,web protege pluge是什么?出现问题就去Protege的Mailing List上面问好了,比到这里来问有用,毕竟是人家develop的,而且Jena和Protege的Mailing List答复都很快的,只是要考验一下英语而已^_^
--  作者:blackmatrix
--  发布时间:12/30/2004 3:19:00 PM

--  
最后只剩code-Show source code里面无法显示中文字符了
--  作者:mahongfu
--  发布时间:4/25/2005 3:03:00 PM

--  
我不知道你说的怎么不支持中文,我的我看也可以啊!!要不你就把环境变量设置设置,改成中文的.试试看!!
--  作者:linminz
--  发布时间:4/30/2005 4:00:00 PM

--  
我现在还不了解是怎么做的,
但我知道原因,
我们这里有个同事就能把他该过来,
好象是要该三个.jar包中的文件
--  作者:泡泡天上飘
--  发布时间:5/17/2005 12:01:00 PM

--  
我的更郁闷,在protege里面还看的到中文的,export owl 之后就变乱码了。
W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
93.750ms