[issue16218] Python launcher does not support unicode characters

Serhiy Storchaka report at bugs.python.org
Mon Nov 5 08:55:53 CET 2012


Serhiy Storchaka added the comment:

Such test is not enough.

1. It skipped on locales which does not support "£" (cp1006, cp1250, cp1251, cp737, cp852, cp855, cp866, cp874, cp949, euc_kr, gb2312, gbk, hz, iso2022_kr, iso8859_10, iso8859_11, iso8859_16, iso8859_2, iso8859_4, iso8859_5, iso8859_6, johab, koi8_r, koi8_u, mac_arabic, mac_farsi, ptcp154, tis_620).  But the bug is actual on such locales.

2. It tests nothing on utf-8 locale (test passed even when bug is not fixed).

We should test every filename which can be used in file system, even if it can not be decoded using current locale or UTF-8 encoding.  On Unix filenames are bytes sequences and we should use non_ascii_bytes.decode(sys.getfilesystemencoding(), 'surrogateescape') as script name.  On Windows it possible will be chr(k) where k is minimal code > 127 such that chr(k).encode('mbcs') is not fails (I am not sure).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16218>
_______________________________________


More information about the Python-bugs-list mailing list