Message8296
java code
class A{
String toString() {
return "哈"
}
}
jython code:(I use PythonInterpreter)
a=A()
print a
when print a java Object, jython cant support unicode, I think this is a bug
PyJavaType code(__repr__ print a string,but this encode by local charset):
addMethod(new PyBuiltinMethodNarrow("__repr__") {
@Override
public PyObject __call__() {
String toString = self.getJavaProxy().toString();
return toString == null ? Py.EmptyString : Py.newString(toString);
}
}); |
|
Date |
User |
Action |
Args |
2014-04-22 15:04:01 | liucong0311 | set | messageid: <1398179041.75.0.806387774249.issue2128@psf.upfronthosting.co.za> |
2014-04-22 15:04:01 | liucong0311 | set | recipients:
+ liucong0311 |
2014-04-22 15:04:01 | liucong0311 | link | issue2128 messages |
2014-04-22 15:04:01 | liucong0311 | create | |
|