2 ms·
> And yes, Python’s subprocess module can’t prevent this. A reasonably sane solution would be for it to reject command line arguments on Windows that contain n
by layer8 2y ago
> And yes, Python’s subprocess module can’t prevent this.
A reasonably sane solution would be for it to reject command line arguments on Windows that contain non-ASCII characters or ASCII characters that aren’t portable across code pages (not all code pages are a superset of US-ASCII), by default, and to support an optional parameter to allow the full range, documenting the risk.
- veltas 2y agoThat's not sane at all, because then you can't send e.g. Japanese arguments to tools that support wide chars or have UTF-8 codepage in their manifest. And then there's yet another difference between Python versions to trip you up. And why should the default not allow internationalisation? Doesn't fit with the idea of Python 3.