Skip to content

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

Closed

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)

Activity

  1. christian-korneck commented on Aug 12, 2017

    @christian-korneck

    👍

  2. added
    Product-ColortoolThis is a problem with the utility application ColorTool for manipulating the console color palette.
    and removed
    Product-ColortoolThis is a problem with the utility application ColorTool for manipulating the console color palette.
    on Aug 14, 2017
  3. khouzam commented on Aug 14, 2017

    @khouzam

    This has been merged.

  4. added a commit that references this issue on Oct 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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