We are receiving data in different encoding format, currently we are using below mentioned java encodings https://docs.oracle.com/javase/1.5.0/docs/guide/intl/encoding.doc.html
we are moving to python so changing this encoding logic into python. As python is not supporting encoding for Chinese character which is equivalent to java encoding Cp935 we are using javabridge code as below
`
class String:
new_fn = javabridge.make_new("java/lang/String", "([BLjava/lang/String;)V")
def __init__(self, i, s):
self.new_fn(i, s)
toString = javabridge.make_method("toString", "()Ljava/lang/String;", "Retrieve the string value")
array = numpy.array(list(fielddata) , numpy.uint16)
strobject = String(array,encoding)
convertedstr = strobject.toString() `
however we are getting the error
'utf-8' codec can't decode byte 0xc0 in position 0: invalid start byte
looking for the help or alternative way of doing this in python.