Issue 36609: activate.ps1 in venv for Windows should encoded with BOM (original) (raw)

Issue36609

Created on 2019-04-12 08:27 by 정한솔, last changed 2022-04-11 14:59 by admin.

Messages (2)
msg340014 - (view) Author: 정한솔 (정한솔) Date: 2019-04-12 08:27
"activate.ps1" (venv) is currently encoded as UTF8 without BOM. But this cause an error if path of an environment contains non-ASCII characters. It seems Powershell can't recognize UTF8 without BOM. If I changed encoding of activate.ps1 to UTF8-BOM, it works well. So I think activate.ps1 should be encoded as UTF8-BOM. https://stackoverflow.com/questions/14482253/utf8-script-in-powershell-outputs-incorrect-characters
msg340092 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2019-04-12 18:06
Seems reasonable. The most reliable way to do this will be to override the copy function for this file in venv and write it out with "utf-8-sig" encoding. There are many ways that git will break things like this, so I wouldn't trust it to simply accept a modified file.
History
Date User Action Args
2022-04-11 14:59:13 admin set github: 80790
2019-04-12 18:06:53 steve.dower set messages: +
2019-04-12 08:33:33 xtreak set nosy: + tim.golden, steve.dower, zach.ware, paul.moorecomponents: + Windowsversions: + Python 3.8, - Python 3.6
2019-04-12 08:27:01 정한솔 create