jsp制作wap网站时中文字符问题的一些解 |
|---|
| WAP技术站:www.wapease.com
|
int tempint; for(int i = 0;i < temp.length;i++){ b[i] = (byte)temp[i]; tempint = (int)b[i]; System.out.println("第"+i+"个字符的编码为:" + tempint + "\t二进制码 为:"+Integer.toBinaryString(tempint)); } String destString = new String(b,"GB2312"); System.out.println(destString); return destString; }catch(java.io.UnsupportedEncodingException e){ return "不支持的字符编码";} } 希望您看到我瘰疬罗嗦的代码不要心烦。主要的没有多少。jsp中汉字在数据库 |
| 上一篇:WAP与PHP - 附件 下一篇:WML,Apache,和 PHP 的介绍 |
|
