We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 91edde8 commit 07ca2a0Copy full SHA for 07ca2a0
javaobj.py
@@ -47,6 +47,12 @@
47
# Python 3+
48
from io import BytesIO
49
50
+try:
51
+ import ftfy.bad_codecs
52
+ javacodec = "utf-8-var"
53
+except ImportError:
54
+ javacodec = "utf-8"
55
+
56
# ------------------------------------------------------------------------------
57
58
# Module version
@@ -641,7 +647,7 @@ def _readString(self, length_fmt="H"):
641
647
"""
642
648
(length,) = self._readStruct(">{0}".format(length_fmt))
643
649
ba = self.object_stream.read(length)
644
- return to_str(ba)
650
+ return to_str(ba.decode(javacodec))
645
651
646
652
def do_classdesc(self, parent=None, ident=0):
653
0 commit comments