New submission from David Watson <[EMAIL PROTECTED]>:

The error message has no newline at the end:

$ LANG=en_GB.UTF-8 python3.0 test.py $'\xff'
Could not convert argument 2 to string$

Seriously, though: is this the intended behaviour?  If the
interpreter just dies when it gets a non-UTF-8 (or whatever)
argument, it creates an opportunity for a denial-of-service if
some admin is running a Python script via find(1) or similar.
And what if you want to run a Python script on some files named
in a mixture of charsets (because, say, you just untarred an
archive created in a foreign charset)?

Could sys.argv not provide bytes objects for those arguments,
like os.listdir()?  Or (better IMHO) have a separate
sys.argv_bytes interface?

----------
components: Unicode
messages: 67608
nosy: baikie
severity: normal
status: open
title: Problem with invalidly-encoded command-line arguments (Unix)
type: behavior
versions: Python 3.0

_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3023>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to