比如 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.
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.
我们这些宽字符就要用其他编码了。
由于unicode占用固定的位数,传输和存储比较浪费而产生了UTF-8,该码兼容unicode但他不是定长的.可以理解为UTF-8和unicode类似和ASCII不是一个东西
中文使用UTF-16