Windows editors, including ISE, tend to save files using what is commonly known as ANSI encoding; this is more correctly known as Windows-1252.
As Windows-1252 is a Microsoft native format, it may be more appropriate to save files in a universally accepted format such as UTF8.
Editor defaults
PowerShell ISE defaults to saving files in UTF8 with a Byte Order Mark (BOM).
Visual Studio Code saves files using UTF8 (without a BOM) by default. The setting may be changed in User Settings by adding "files.encoding": "utf8bom".
PowerShell ISE defaults to saving files in UTF8 with a Byte Order Mark (BOM).
Visual Studio Code saves files using UTF8 (without a BOM) by default. The setting may be changed in User Settings by adding "files.encoding": "utf8bom".