Description
gprconfig crashes with ADA.STRINGS.UTF_ENCODING.ENCODING_ERROR when Windows environment variables contain non-ASCII (UTF-8) characters.
Environment
- OS: Windows 11 (or your version)
- gprbuild version: 25.0.1
- Alire version: 2.1.0
Steps to Reproduce
- Have a Windows environment variable with non-ASCII characters
(e.g., OneDrive=C:\Users\user\OneDrive - Politécnica)
- Run any Alire/gprbuild command:
alr clean or gprconfig --config ada
Expected Behavior
The command should execute normally, handling UTF-8 encoded paths.
Actual Behavior
Crash with stack trace:
Unrecoverable error in GPRconfig: raised ADA.STRINGS.UTF_ENCODING.ENCODING_ERROR : bad input at Item (50)
Workaround
Clearing the problematic environment variables before running:
set OneDrive=
set OneDriveCommercial=