Skip to content

iTerm2 color schemes can not be parsed when using a non-english locale #2

@MindGirl

Description

@MindGirl

When trying to apply an iTerm2 color scheme on a computer with a German locale, the scheme can not be parsed (and applied).

Error message:

schemes\deuteranopia.itermcolors
Invalid Color
Invalid scheme - did not find 16 colors
Error loading ini file "./schemes\deuteranopia.itermcolors"
    for key "DARK_BLACK"
    the value "" is invalid
Could not find or load "schemes\deuteranopia.itermcolors"
Press any key to continue . . .

I tracked it down to Convert.ToDouble used in https://github.com/Microsoft/console/blob/1be2939f257bc89136bd6ea2ee04cdf75d12f3f0/tools/ColorTool/ColorTool/XmlSchemeParser.cs#L48 which will use the current locale to parse the value. Because we use a comma as decimal separator and the dot as group separator, the values are invalid.

I created a pull request (#1: Use invariant culture for parsing double values)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Product-ColortoolThis is a problem with the utility application ColorTool for manipulating the console color palette.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions