Skip to content

gprconfig crashes with ENCODING_ERROR when environment variables contain non-ASCII characters #14

@santiagomfo

Description

@santiagomfo

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

  1. Have a Windows environment variable with non-ASCII characters
    (e.g., OneDrive=C:\Users\user\OneDrive - Politécnica)
  2. 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=

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions