I’m having trouble with file encoding when working with PowerShell and GitHub. My PowerShell scripts get saved in Unicode format by default when I use the ISE editor. The problem is that GitHub expects UTF-8 encoding and can’t display my files properly.
For example, when I run simple commands like:
Write-Output "Hello World" | Out-File sample.txt
The resulting file uses Unicode encoding, which causes display issues on GitHub’s interface. I need to find an efficient way to handle this encoding problem without manually converting every single file before each commit. Has anyone found a good workflow for this situation?