On Windows, open() without explicit encoding uses the system locale (cp1252/etc.), which can cause OSError errno 22 'Invalid argument' when reading/writing the UTF-8 .env file. Fix: gate encoding kwargs behind _IS_WINDOWS check so Linux/macOS code paths are completely unchanged. Only Windows gets explicit encoding='utf-8' on load_env() and save_env_value().
36 KiB
36 KiB