|
Lines 53-59
Link Here
|
| 53 |
final byte[] res = new byte[buf.capacity()]; |
53 |
final byte[] res = new byte[buf.capacity()]; |
| 54 |
buf.get(res); |
54 |
buf.get(res); |
| 55 |
try { |
55 |
try { |
| 56 |
return new String(res, "US-ASCII"); |
56 |
return new String(res, "UTF-8"); |
| 57 |
} catch (final UnsupportedEncodingException e) { |
57 |
} catch (final UnsupportedEncodingException e) { |
| 58 |
throw new ALException(e); |
58 |
throw new ALException(e); |
| 59 |
} |
59 |
} |
|
Lines 111-117
Link Here
|
| 111 |
while ((i < bytes.length) && (bytes[i] != 0)) { |
111 |
while ((i < bytes.length) && (bytes[i] != 0)) { |
| 112 |
i++; |
112 |
i++; |
| 113 |
} |
113 |
} |
| 114 |
res.add(new String(bytes, startIndex, i - startIndex, "US-ASCII")); |
114 |
res.add(new String(bytes, startIndex, i - startIndex, "UTF-8")); |
| 115 |
i++; |
115 |
i++; |
| 116 |
} |
116 |
} |
| 117 |
return (String[]) res.toArray(new String[res.size()]); |
117 |
return (String[]) res.toArray(new String[res.size()]); |