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

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

Open
WesleyBlancoYuan opened this issue Jun 20, 2017 · 3 comments

Comments

@WesleyBlancoYuan
Copy link

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).

@rbeesley
Copy link
Collaborator

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.

@WesleyBlancoYuan
Copy link
Author

WesleyBlancoYuan commented Jun 25, 2017

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?

@rbeesley
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants