java字符集转换 Big5 和 Unicode互转
来源:互联网 发布:iaas云计算架构 编辑:程序博客网 时间:2024/06/16 20:56
完整的代码如下注:文章系本人原创:发布于 <script type="text/javascript"><!--google_ad_client = "ca-pub-1944176156128447";/* csdn 横中 */google_ad_slot = "7877933139";google_ad_width = 468;google_ad_height = 60;//--></script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>12345678910111213141516171819202122232425262728293031323334353637/**
* java字符集转换 Big5 和 Unicode互转
* 转换后的正常字型
*/
import
java.io.*;
public
class
Big5Unicode{
public
static
String big5ToUnicode(String s){
try
{
return
new
String(s.getBytes(
"ISO8859_1"
),
"Big5"
);
}
catch
(UnsupportedEncodingException uee){
return
s;
}
}
public
static
String UnicodeTobig5(String s){
try
{
return
new
String(s.getBytes(
"Big5"
),
"ISO8859_1"
);
}
catch
(UnsupportedEncodingException uee){
return
s;
}
}
public
static
String toHexString(String s){
String str=
""
;
for
(
int
i=
0
; i<s.length(); i++){
int
ch=(
int
)s.charAt(i);
String s4=
"0000"
+Integer.toHexString(ch);
str=str+s4.substring(s4.length()-
4
)+
" "
;
}
return
str;
}
}
- java字符集转换 Big5 和 Unicode互转
- 【转】GB2312、UNICODE和BIG5的相互转换
- 【总结】Java和Unicode字符集
- delphi 编码转换 unicode gbk big5
- Delphi 编码转换 Unicode gbk big5
- vc中GB2312,BIG5,Unicode相互转换
- vc中GB2312,BIG5,Unicode编码转换
- vc中GB2312,BIG5,Unicode相互转换
- vc中GB2312,BIG5,Unicode相互转换
- delphi 编码转换 unicode gbk big5
- 字符集编码(GBK,BIG5,UNICODE)与C++的string/wstring
- 字符集编码(GBK,BIG5,UNICODE)与C++的string/wstring
- Unicode以及字符集转换
- Big5和Gb编码转换
- ANSI字符集和Unicode字符集
- ANSI字符集和Unicode字符集
- ANSI字符集和Unicode字符集
- 字符集之间转换(UTF-8,UNICODE,Gb2312)c++and java
- Android Asynchronous Http Client
- 6.数组
- C#连接数据库
- 使用iOS手势UIGestureRecognizer
- Java:对象的强、软、弱和虚引用
- java字符集转换 Big5 和 Unicode互转
- Android vibrate+ 振动
- 说说Python程序的执行过程
- android软引用
- WP_How to: Create Your First Silverlight Application for Windows Phone(1)
- Android 笑话+html 实例开发(详解)
- Android 检查当前是否已经连接上 Internet
- java内存原型分析-基本知识
- Java容器整理