-
Couldn't load subscription status.
- Fork 24
Remove UTF-8 BOM from text files (except PowerShell files) #100
Conversation
|
Probably best not to remove the BOM from PowerShell scripts. Any script that needs to be run by Windows PowerShell needs a BOM so that WinPS won't try to read it as CP-1252 |
Ha, yes, despite the attributions at the top, I wrote that doc
Yes, they are for now, but the issue arises when people edit them |
|
This repo contains 13 Maybe we need to consider adding a BOM to the remaining PowerShell files. Alternatively, we could add a test to ensure all PowerShell files are ASCII-safe. |
Yeah, it sounds like adding the BOM would be a good idea. PSScriptAnalyzer exports this rule to assess scripts' need for a BOM. |
|
Ah, so that's the purpose of |
|
I think the best approach would be to check the PowerShell files are ASCII-safe with a Github action. However, in the short term, the simplest solution seems to be just to add the BOM to these files. |
|
@rjmholt This PR is ready for review. |
See also: PowerShell/PowerShell#11546