Windows is not known for its interporability with UTF-8 (and you can find countless search results on the matter). However, things have changed in Windows 10 and if you follow these steps, you can have a UTF-8 workflow.
- Get the new Windows Terminal. It has full support for Unicode and UTF-8.
- Download the new PowerShell. The new version of PowerShell is UTF-8 first, and will output UTF-8 files by default (see the default encoding of Out-File).
- Ensure that Windows Terminal uses
powershell.exein the Windows Powershell profile.
- Enable the new UTF-8 option in Windows settings. Go to the language settings, click Administrative language settings, then Change system locale… and tick the Beta: Use Unicode UTF-8 for worldwide language support option.
- Restart your computer.
If you stick to using the new Windows Terminal, everything should read, write and display UTF-8 by default.