关于从java客户端到数据库的数据转换中的编码问题的解决方案

下面所述均以utf-8的编码格式为标准

1.java客户端

(1)将编辑器的所有的编码格式设置为utf-8格式,若是eclipse或myeclipse则可参照以下方法:

<span style="background-color: rgb(255, 252, 246);"><strong>①</strong></span><span style=" font-family: Arial, Helvetica, sans-serif; background-color: rgb(255, 252, 246);"><strong>Window->Preferences->General->Content Types……</strong></span><span style="font-weight: bold; background-color: rgb(255, 252, 246); font-family: Arial, Helvetica, sans-serif;">修改一类文件的编码方式</span>
<span style="font-weight: bold; background-color: rgb(255, 252, 246); font-family: Arial, Helvetica, sans-serif;"></span><pre id="best-answer-content" class="reply-text mb10" name="code" style="margin-top: 0px; margin-bottom: 10px; background-color: rgb(255, 255, 255); white-space: pre-wrap; word-wrap: break-word; font-size: 14px; line-height: 26px; padding: 0px; zoom: 1;"><span style="background-color: rgb(255, 252, 246);"><strong>②</strong></span><span style="background-color: rgb(255, 252, 246); font-family: Arial, Helvetica, sans-serif;">Window->Preferences->General->Editors->Text Editors->Spelling</span>
<span style="background-color: rgb(255, 252, 246); font-family: Arial, Helvetica, sans-serif;"></span><pre id="best-answer-content" class="reply-text mb10" name="code" style="margin-top: 0px; margin-bottom: 10px; background-color: rgb(255, 255, 255); white-space: pre-wrap; word-wrap: break-word; font-size: 14px; line-height: 26px; padding: 0px; zoom: 1;"><span style="background-color: rgb(255, 252, 246);"><strong>③</strong></span><span style="background-color: rgb(255, 252, 246); font-family: Arial, Helvetica, sans-serif;">Window->Preferences->General->Workspace……</span><span style="background-color: rgb(255, 252, 246); font-family: Arial, Helvetica, sans-serif;">修改工作空间的编码方式</span>
<span style="background-color: rgb(255, 252, 246); font-family: Arial, Helvetica, sans-serif;"></span><pre id="best-answer-content" class="reply-text mb10" name="code" style="margin-top: 0px; margin-bottom: 10px; background-color: rgb(255, 255, 255); white-space: pre-wrap; word-wrap: break-word; font-size: 14px; line-height: 26px; padding: 0px; zoom: 1;"><span style="background-color: rgb(255, 252, 246);"><strong>④</strong></span><span style="background-color: rgb(255, 252, 246); font-family: Arial, Helvetica, sans-serif;">右键单击项目名称->Properties->Resource->Text file encoding……</span><span style="background-color: rgb(255, 252, 246); font-family: Arial, Helvetica, sans-serif;">修改单个工程的编码方式;若右键单击一个文件,则修改单个文件的编码方式</span>

 
 
 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值