Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Jute Powerful Forum  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 发现一个bug!
yadan



Jute User


发贴: 226
积分: 30
于 2003-05-13 16:20 user profilesend a private message to usersend email to yadansearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
帖子中包含特殊符号,例如“欧元”的符号时,帖子内容会全部清空!


作者 Re:发现一个bug! [Re:yadan]
yadan



Jute User


发贴: 226
积分: 30
于 2003-05-13 16:21 user profilesend a private message to usersend email to yadansearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list



作者 Re:发现一个bug! [Re:yadan]
yadan



Jute User


发贴: 226
积分: 30
于 2003-05-13 16:27 user profilesend a private message to usersend email to yadansearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
上面的帖子内容没有,管理员可以在数据库数看看有到底没有内容~


作者 Re:发现一个bug! [Re:yadan]
rainman

阿熊

元老


发贴: 5644
积分: 454
于 2003-05-14 01:26 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
数据库里应该没有,我想这是mysql的脱字符引起的,我会试试看。



作者 Re:发现一个bug! [Re:rainman]
rainman

阿熊

元老


发贴: 5644
积分: 454
于 2003-05-14 03:11 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
这个问题原因我已经清楚了。
这是因为系统采用了GBK编码,而不是ISO-8859-1编码,采用“字”而不是“字节”。欧元符号不在GBK编码里。

解决的方法有两个,一是系统采用UTF-8编码,二是系统采用ISO-8859-1编码。后者需要改动模板使得页面encoding仍然是GBK。




作者 Re:发现一个bug! [Re:yadan]
yadan



Jute User


发贴: 226
积分: 30
于 2003-05-14 09:16 user profilesend a private message to usersend email to yadansearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
就是说“欧元”符号用GBK编码存入数据库的时候就已经丢失了?

你说的解决方法是不是:数据存入时用is0-8859-1的编码,数据显示时一律把8859转换成GBK编码?



作者 Re:发现一个bug! [Re:yadan]
SimonLei



CJSDN高级会员


发贴: 288
积分: 100
于 2003-05-14 11:03 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
rainman, 我还以为 jute 是全部使用utf-8的呢。
你的多语言版本怎么实现的?我记得以前你在同一个
页面测试过多种语言,难道那些语言都在GBK里面?



You may say I am a dreamer, But I am not the only one.
My blog+wiki: http://blogsite.3322.org/
作者 Re:发现一个bug! [Re:yadan]
rainman

阿熊

元老


发贴: 5644
积分: 454
于 2003-05-14 11:21 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
可以选择全用UTF-8,那就没有字符集的问题,但考虑原有数据库编码不一定是UTF-8,还有一些数据库支持的问题,所以Jute是可选编码的。

如用ISO-8859-1编码,那么所有中文都拆两个字节处理,这样也不会有乱码问题。但这样总是觉得不爽的。




作者 Re:发现一个bug! [Re:yadan]
rainman

阿熊

元老


发贴: 5644
积分: 454
于 2003-05-14 11:24 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
yadan wrote:
就是说“欧元”符号用GBK编码存入数据库的时候就已经丢失了?

你说的解决方法是不是:数据存入时用is0-8859-1的编码,数据显示时一律把8859转换成GBK编码?


对啊,Servlet按GBK编码取字符串的时候就取不出了啊。所以变?。用ISO-88591的时候按ASCII编码取,就不会出问题了,显示的时候其实也是按ISO--8859-1显示,只不过在页面里指定网页编码。




作者 Re:发现一个bug! [Re:yadan]
yadan



Jute User


发贴: 226
积分: 30
于 2003-05-16 12:37 user profilesend a private message to usersend email to yadansearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
请问rainman,如果按照UTF-8的方案处理,存入mysql的应该是什么编码?
mysql支持utf的编码么?


yadan edited on 2003-05-16 16:43

作者 Re:发现一个bug! [Re:yadan]
rainman

阿熊

元老


发贴: 5644
积分: 454
于 2003-05-16 12:43 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
存入的是UTF-8编码。




flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923