We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 011c016 commit c2e91f8Copy full SHA for c2e91f8
pandas/io/common.py
@@ -877,7 +877,8 @@ def read(self, size: int = -1) -> str | bytes:
877
if self.decode:
878
# memory mapping is applied before compression. Encoding should
879
# be applied to the de-compressed data.
880
- return content.decode(self.encoding, errors=self.errors)
+ final: bool = len(content) == 0
881
+ return self.decoder.decode(content, final=final)
882
return content
883
884
def __next__(self) -> str:
0 commit comments