neilpa/cmd-colors-solarized

REG files are saved with UTF-8 BOM and cannot be imported. Must save with UTF-8

Opened this issue · 3 comments

As title indicates, the REG files cannot be imported. Error is:

Cannot import xxxxx.reg: the script file is not a Registry script. Only binary archives of Registry can be imported via Registry Editor.

I open the file with Sublime Text 3 and found it is encoded with UTF-8 with BOM. I saved it with UTF-8 without BOM and all is fine.

It may has something to do with my OS locale: Spanish (Spain).

I looked at both my repository fork and neilpa's repository and all the .reg files in both repositories are UTF-8 w/o BOM.

To be honest, the registry files are somewhat limited in what they can do for you since most of the time you are going to be launching a file from a shortcut, and it is the shortcut .lnk file which dictates the color scheme applied.

OK so there may be some weird issue with my part. Just mention it in case for someone else in my situation. Thank you.

I am also aware of what you have said: the configuration is done at .lnk/.exe level for cmd.exe, at least here in Windows 10. I haven't tested in other versions of Windows. Changing color table only works for cmd.exe launched in context menu. So I also define some colo themes solely for cmd.exe in my repo, shown in images as a manual. Maybe the table works for powershell?

Read what Rich Turner had to say on the Window Command Line Tools For Developers Blog: Understanding Windows Console Host Settings. It isn't so straight forward. Most of the time when you are launching something, you are running a .lnk and that's where the color settings come from. However, you can't assume that is the case every time.