New submission from Serhiy Storchaka <storchaka+cpyt...@gmail.com>:

The fromfile_prefix_chars option allows you to read arguments from file. But 
open() without explicit encoding is used for this. Therefore the result is 
depending on the current locale or the PYTHONIOENCODING environment variable. 
On Linux this is rare a problem, because UTF-8 is a common locale encoding, but 
on Windows the locale encoding is usually 8-bit and may even be not able to 
encode all file names.

I think we need a new option to specify the encoding for files from which 
arguments are read.

----------
components: Library (Lib)
messages: 372452
nosy: rhettinger, serhiy.storchaka
priority: normal
severity: normal
status: open
title: argparse uses default encoding when read arguments from file
type: enhancement
versions: Python 3.10

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue41136>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to