-
Notifications
You must be signed in to change notification settings - Fork 37
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
Fix #60: Use proper encoding on Windows #91
Conversation
@hdpoliveira Is the idea here to set command output to a binary encoding, and let Windows decode it at some higher level using whatever weird process it wants? This is a big change to all command output on Windows, so I just want to make sure it works for utf8/16 file names and file contents on Windows. For instance, the extension uses The general approach looks good, just wanna make sure it works, and unfortunately I don't have a Windows machine. Can you tell me more about the testing you've done? |
We already configure mercurial encoding to be utf8, so it seems the node encoding get on the way. For the testing, I tested on a root directory with an "á", and on a file name with an "é", but I didn't test the file contents. I'll do that 😊. The testing I did: initialize one repository blá, check that the extension detects an Hg repository, create a new file, check that the extension detects an untracked file, add the file via the SCM tab, commit it. Clone from blá into blé. Modify file in blá, check that the extension detects modifications to file, commit. Pull from blé. In blé, create new file bló, check it's untracked, add file via SCM tab, commit, push to blá. Do you see other gaps? |
Great! Oh, put some of those cháractérs into commit messages too, and try the "Show file history" command. That's the other place where user-generated text ends up in command output. |
Yeah well, it broke hg cat |
I'm almost getting to the conclusion this is unfixable...
At some places it prints blÚ and others prints bl├®.
It looks like there is a different encoding for file paths versus text. #60 is with respect to file paths. |
Ok, this solution is the best I can think of. It resolves #60 without breaking commit messages or file diff. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like a good compromise.
No description provided.