Android Utililty Methods GB2312 to String Convert

List of utility methods to do GB2312 to String Convert

Description

The list of methods to do GB2312 to String Convert are organized into topic(s).

Method

Stringgb2312ToString(byte[] b)
gb To String
return gb2312ToString(b, 0, b.length);
Stringgb2312ToString(byte[] b, int offset, int len)
gb To String
byte[] buf = new byte[len];
for (int i = 0; i < len / 2; i++) {
    if (b[offset + i * 2] != '\0') {
        buf[i * 2] = (byte) (b[offset + i * 2] | 0x80);
        buf[i * 2 + 1] = (byte) b[offset + i * 2 + 1];
    } else {
        buf[i * 2] = '\0';
        buf[i * 2 + 1] = '\0';
...