PowerShell / Modules

MIT License
111 stars 25 forks source link

Add UTF-8 BOM for PowerShell files #101

Open xtqqczze opened 3 years ago

xtqqczze commented 3 years ago

As discussed in #100, Windows PowerShell defaults to the Windows-1252 file encoding, so the UTF-8 BOM may be needed to avoid encoding issues in PowerShell files.

https://docs.microsoft.com/powershell/scripting/dev-cross-plat/vscode/understanding-file-encoding

iSazonov commented 3 years ago

Windows PowerShell defaults to the Windows-1252 file encoding

On English Windows version. What about localized Windows version?

xtqqczze commented 3 years ago

Windows PowerShell defaults to the Windows-1252 file encoding

On English Windows version. What about localized Windows version?

Yes, it may differ. That's one more reason to add a UTF-8 BOM to files interpreted by Windows PowerShell. 😄