Android Utililty Methods Unicode to String Convert

List of utility methods to do Unicode to String Convert

Description

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

Method

StringunUnicode(String s)
un Unicode
char[] in = s.toCharArray();
int off = 0;
int len = s.length();
char[] convtBuf = s.toCharArray();
char aChar;
char[] out = convtBuf;
int outLen = 0;
int end = off + len;
...
StringgetFromCompressedUnicode(final byte[] string, final int offset, final int len)
Read 8 bit data (in ISO-8859-1 codepage) into a (unicode) Java String and return.
try {
    int len_to_use = Math.min(len, string.length - offset);
    return new String(string, offset, len_to_use,
            ENCODING_ISO_8859_1);
} catch (UnsupportedEncodingException e) {
    throw new RuntimeException(e);
StringunicodeToString(String hex)
unicode To String
int t = hex.length() / 6;
StringBuilder str = new StringBuilder();
for (int i = 0; i < t; i++) {
    String s = hex.substring(i * 6, (i + 1) * 6);
    String s1 = s.substring(2, 4) + "00";
    String s2 = s.substring(4);
    int n = Integer.valueOf(s1, 16) + Integer.valueOf(s2, 16);
    char[] chars = Character.toChars(n);
...