-
Notifications
You must be signed in to change notification settings - Fork 513
Add a doc about encoding configuration #1761
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
Conversation
This should go on PowerShell-Docs instead I think. Can you move it there before we get too many comments? |
@@ -0,0 +1,327 @@ | |||
# Configuring VSCode and PowerShell to prevent encoding bugs |
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.
Does this apply to both Windows PowerShell and PowerShell Core? I thought PowerShell Core was immune from this issue? If so, maybe this should say "Windows PowerShell"? OK, it appears that pwsh on Windows doesn't use utf-8 (no BOM). But pwsh on Linux, and presumably macOS, do use utf-8. So maybe this should be "to prevent encoding bugs on Windows"?
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.
Nevermind, the above was clarified after reading the rest of the doc.
and set the `"files.encoding"` setting: | ||
|
||
```json | ||
"files.encoding": "utf8bom" |
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.
It may be worth pointing out that you can make this encoding change just for PoweShell files:
"[powershell]": {
"files.encoding": "utf8bom"
}
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.
Outstandind! Only one little comment on how to make the VSCode file encoding setting be specific to PowerShell files.
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.
This doc brought tears to my eyes it was so good. LGTM. Just people move it to the other repo.
PR Summary
Adds a document that deals with configuring encoding in VSCode and PowerShell so that there are no nasty surprises.
PR Checklist
Note: Tick the boxes below that apply to this pull request by putting an
x
between the square brackets.Please mark anything not applicable to this PR
NA
.WIP:
to the beginning of the title and remove the prefix when the PR is ready