Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
MindGirl opened this issue Aug 12, 2017 · 2 comments
Closed
Labels
Product-Colortool This is a problem with the utility application ColorTool for manipulating the console color palette.

Comments

@MindGirl
Copy link
Contributor

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)

@christian-korneck
Copy link

👍

@zadjii-msft zadjii-msft added Product-Colortool This is a problem with the utility application ColorTool for manipulating the console color palette. and removed Product-Colortool This is a problem with the utility application ColorTool for manipulating the console color palette. labels Aug 14, 2017
@khouzam
Copy link

khouzam commented Aug 14, 2017

This has been merged.

@khouzam khouzam closed this as completed Aug 14, 2017
miniksa pushed a commit that referenced this issue Oct 4, 2019
@mkitzan mkitzan mentioned this issue Jan 10, 2020
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Product-Colortool This is a problem with the utility application ColorTool for manipulating the console color palette.
Projects
None yet
Development

No branches or pull requests

4 participants