读书人

UTF是不是ASC码?该如何解决

发布时间: 2012-01-24 23:11:54 作者: rapoo

UTF是不是ASC码?
比如 Class DataInputStream 里面有 readUTF() 这个方法
Reads from the stream in a representation of a Unicode character string encoded in modified UTF-8 format; this string of characters is then returned as a String. The details of the modified UTF-8 representation are exactly the same as for the readUTF method of DataInput.

[解决办法]
keyword: unicode utf-8
[解决办法]
unicode字符集的一种外部编码,要注意区分字符集和字符编码的概念
[解决办法]
当然不是了,ascii最简单,7位,只支持简单的字符,
我们这些宽字符就要用其他编码了。
[解决办法]
根本不是一个东西!
由于unicode占用固定的位数,传输和存储比较浪费而产生了UTF-8,该码兼容unicode但他不是定长的.可以理解为UTF-8和unicode类似和ASCII不是一个东西
[解决办法]
如果是英文,那就一样了
[解决办法]
UTF-8一般就是英文了
中文使用UTF-16
[解决办法]
显然不是
[解决办法]
up
[解决办法]
两种不同的编码格式,

见http://community.csdn.net/Expert/TopicView.asp?id=5259155

读书人网 >J2SE开发

热点推荐