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()

The file `virtual_conf` was open with encoding `gbk` which is my windows 
default encoding, but in fact, the file is an `utf-8` one, so i think it should 
be::

        with open(virtual_conf, encoding='utf-8') as f:
            for line in f:
                line = line.strip()

----------
messages: 253968
nosy: tanbro
priority: normal
severity: normal
status: open
title: virtual conf file encoding error on windows
type: crash
versions: Python 3.5

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

Reply via email to