uv/crates/uv-virtualenv
梦飞翔 4d9c861506
Update code page to 65001 before setting environment variables, fix #11828 (#11831)
## Summary

When executing `.venv\Scripts\activate` in `cmd`, the script uses the
local codepage for execution. This causes issues when the file path
contains non-ASCII characters, resulting in corrupted environment
variables such as `VIRTUAL_ENV`.

See #11828.

Code used to fix the issue was adapted from
https://github.com/python/cpython/blob/3.13/Lib/venv/scripts/nt/activate.bat#L3-L9.

## Test Plan

Before:

![image](https://github.com/user-attachments/assets/f8a50675-a688-4b4b-9d1b-0a5d5f736123)

After:

![image](https://github.com/user-attachments/assets/3aed978e-4c9b-40e4-a689-9a602f95b725)
(`chcp` command cleared the history lol)
2025-02-27 16:14:34 -05:00
..
src Update code page to 65001 before setting environment variables, fix #11828 (#11831) 2025-02-27 16:14:34 -05:00
Cargo.toml Remove unused thiserror variants (#11713) 2025-02-22 12:12:22 -10:00
README.md Rename gourgeist to uv-virtualenv (#2118) 2024-03-01 14:02:40 -05:00

uv-virtualenv

uv-virtualenv is a rust library to create Python virtual environments. It also has a CLI.