常用默认字符集

1.中文字符转换:

    String newStr =

new String(oldStr.getBytes(oldEncodeSet),newEncodeSet);

    其中oldEncodeSet是原字符集,newEncodeSet是目的字符集.

2.各应用程序的字符编码格式:

    普通Java Application:iso8859-1

    MySQL数据库:gb2312(可选择encoding)

    html表单:iso8859-1

 
posted @ 2008-02-28 21:53  icewolf29  阅读(160)  评论(0)    收藏  举报