Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Checked out PR file diffs sometimes complain about different encodings #1010

Closed
jcansdale opened this issue Jun 13, 2017 · 2 comments
Closed
Assignees
Labels

Comments

@jcansdale
Copy link
Collaborator

  • GitHub Extension for Visual Studio version: 2.2.1.100 (dev)
    Visual Studio version: 2015
  1. Select a PR
  2. Checkout PR
  3. Double-click on PR file and open diff view

Sometimes the diff view complains that the files have different encodings (UTF-8 vs Windows).

image

@jcansdale jcansdale added the bug label Jun 13, 2017
@jcansdale jcansdale self-assigned this Jun 13, 2017
jcansdale added a commit that referenced this issue Jun 13, 2017
It appears Visual Studio likes to add a UTF-8 header to files it touches. When creating a temp file to diff against, save as UTF-8 if working file is UTF-8.
Fixes #1010
@jcansdale
Copy link
Collaborator Author

It appears Visual Studio likes to add UTF-8 headers to files it touches. 😕 This seems to change them from being the default Western European (Windows-1252) to being UTF-8.

When creating a temp file to diff against, we should save it as UTF-8, if the working file has been changed to UTF-8.

jcansdale added a commit that referenced this issue Jun 13, 2017
It appears Visual Studio likes to add a UTF-8 header to files it touches. When creating a temp file to diff against, save as UTF-8 if working file is UTF-8.
Fixes #1010
jcansdale added a commit that referenced this issue Jun 13, 2017
It appears Visual Studio likes to add a UTF-8 header to files it touches. When creating a temp file to diff against, save as UTF-8 if working file is UTF-8.
Fixes #1010
@jcansdale
Copy link
Collaborator Author

Fixed in #1011

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

No branches or pull requests

1 participant