Open Source

Tackling issue #36219 in VSCode

For Lab 3 of dps909, we were tasked with investigating and attempting to fix a bug posted for VSCode.

I chose to do issue #36219 “stage selected ranges” command changes encoding to UTF-8. This bug was found on Windows 10 and as the title of the issue suggests causes files staged by the “stage selected ranges” command to have their encoding changed to UTF-8. To replicate this bug you must:

  1. Create a file with non UTF-8 encoding
  2. Commit it
  3. Make some changes
  4. Open VScode’s diff view
  5. Select some range and run command “Git: Stage Selected Ranges”
  6. Check encoding is set to UTF-8

While I was able to replicate the bug, I had no idea where the cause can be located as the issue’s poster has confirmed that the cause isn’t either “files.encoding” or “files.autoGuessEncoding”. I have tried looking online to find out which file may be the cause as well as looking files to find the case but it all came out dry. If I had the more time, I might of have been able to find the cause but other projects are stacking up and I should begin to shift my efforts.

Leave a comment