今天写一个程序使用ROME这个开源组件生成rss2.0文件,
使用utf-8格式保存中文总出现乱码,
从网上搜了一下,Rome在保存数据时采用的是gb2312格式,文件utf-8时即出现乱码,
SyndFeedOutput output = new SyndFeedOutput();
Writer out = null;
out = new FileWriter("文件名");
output.output(feed, out);
改为
SyndFeedOutput output = new SyndFeedOutput();
Writer writer;
...
- 浏览: 6752 次
- 性别:

- 来自: 郑州

- 详细资料
搜索本博客
我的相册
i1
共 16 张
共 16 张
最近加入圈子
最新评论
-
myeclipse6.0下struts2.0+ ...
确实少了3个类!麻烦增加一下呗!
-- by wangt -
myeclipse6.0下struts2.0+ ...
IUserService.java 中没有 getCount() 方法,但在l ...
-- by iamnick -
有关桃桃
我越来发现你太有意思啦
-- by 小嘴看世界






评论排行榜