aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/lzma.py')
-rw-r--r--Lib/lzma.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/lzma.py b/Lib/lzma.py
index 0817b872d20..c8b197055cd 100644
--- a/Lib/lzma.py
+++ b/Lib/lzma.py
@@ -302,6 +302,7 @@ def open(filename, mode="rb", *,
preset=preset, filters=filters)
if "t" in mode:
+ encoding = io.text_encoding(encoding)
return io.TextIOWrapper(binary_file, encoding, errors, newline)
else:
return binary_file