summaryrefslogtreecommitdiffstats
path: root/Lib/argparse.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/argparse.py')
-rw-r--r--Lib/argparse.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/argparse.py b/Lib/argparse.py
index 1c5520c..02e98bb 100644
--- a/Lib/argparse.py
+++ b/Lib/argparse.py
@@ -2161,7 +2161,9 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
# replace arguments referencing files with the file content
else:
try:
- with open(arg_string[1:]) as args_file:
+ with open(arg_string[1:],
+ encoding=_sys.getfilesystemencoding(),
+ errors=_sys.getfilesystemencodeerrors()) as args_file:
arg_strings = []
for arg_line in args_file.read().splitlines():
for arg in self.convert_arg_line_to_args(arg_line):