summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2015-10-01 11:28:34 +0100
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2015-10-01 11:28:34 +0100
commit2c6ea295babf4100422981f4ba1dbed27974a3dc (patch)
tree3529bf9d11a8d760ab7655616602877b89c8f4cc
parentf22d8080ae9f4106d04721fa17660c5b7faf05f2 (diff)
parent2934fd66aec8c1802bcbb0d070c3bad9811d173e (diff)
downloadcpython-git-2c6ea295babf4100422981f4ba1dbed27974a3dc.tar.gz
Closes #25185: merged fix from 3.5.
-rw-r--r--Lib/site.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/site.py b/Lib/site.py
index 6f66c07de5..3a8d1c3728 100644
--- a/Lib/site.py
+++ b/Lib/site.py
@@ -465,7 +465,9 @@ def venv(known_paths):
config_line = re.compile(CONFIG_LINE)
virtual_conf = candidate_confs[0]
system_site = "true"
- with open(virtual_conf) as f:
+ # Issue 25185: Use UTF-8, as that's what the venv module uses when
+ # writing the file.
+ with open(virtual_conf, encoding='utf-8') as f:
for line in f:
line = line.strip()
m = config_line.match(line)