Message1694
iso-8859-1 charset is too simple, maybe convert jarray('b') to error message, examples for socket.py
I think it modified to java.nio.charset.Charset.defaultCharset()
use it maybe righit in most situation!
I found this error using charset 'gbk', chinese~
class PyArray
...........
public String tostring() {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
try {
toStream(bos);
} catch(IOException e) {
throw Py.IOError(e);
}
try {
// The returned string is used as a Python str with values
// from 0-255. iso-8859-1 maps the byte values into that range.
return new String(bos.toByteArray(), "iso-8859-1")
} catch (UnsupportedEncodingException e) {
throw Py.JavaError(e);
}
}
|
|
Date |
User |
Action |
Args |
2008-02-20 17:17:52 | admin | link | issue1745880 messages |
2008-02-20 17:17:52 | admin | create | |
|