[issue21138] mimetypes.MimeType UnicodeDecodeError

2014-04-02 Thread tanbro
New submission from tanbro: when new a mimetypes.MimeType instance in a my Windows, whose default coding is mbcs, UnicdeDecodeError occurred. Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)] on win 32 Type help, copyright, credits or license for more information. from

[issue21138] mimetypes.MimeType UnicodeDecodeError

2014-04-02 Thread tanbro
tanbro added the comment: and in line 249, changes: if isinstance(ctype, unicode): ctype = ctype.encode(default_encoding) # omit in 3.x! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21138

[issue25540] virtual conf file encoding error on windows

2015-11-02 Thread tanbro
New submission from tanbro: When create a new `venv` on windows, sometimes an `UnicodeDecodeError` occurred. It seems that, it is caused by the system module `site`. In `Lib/site.py`, line 468:: with open(virtual_conf) as f: for line in f: line = line.strip

[issue24307] pip error on windows whose current user name contains non-ascii characters

2015-05-27 Thread tanbro-liu
New submission from tanbro-liu: On windows8.1 x64, current user name contains non-ascii characters. When executing ``pip`` in the command-line, such an error happens:: C:\Users\雪彦pip Traceback (most recent call last): File C:\Python27\lib\runpy.py, line 162