We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e727a56 commit 1df9c2dCopy full SHA for 1df9c2d
pandas/io/common.py
@@ -874,7 +874,7 @@ def __iter__(self) -> _MMapWrapper:
874
def read(self, size: int = -1) -> str | bytes:
875
# CSV c-engine uses read instead of iterating
876
content: bytes = self.mmap.read(size)
877
- if self.decode:
+ if self.decode and self.encoding != "utf-8":
878
# memory mapping is applied before compression. Encoding should
879
# be applied to the de-compressed data.
880
final = size == -1 or len(content) < size
0 commit comments