Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

PowerShell does not convert text to UTF-8 by default, so it should not be necessary to stop such a conversion. However, if you are experiencing unexpected text encoding issues, you may want to try specifying the text encoding explicitly using the Encoding parameter of cmdlets like Set-Content or Out-File. For example:

Set-Content -Path "C:\example.txt" -Value "Hello World!" -Encoding ASCII

This would save the text "Hello World!" to the file "C:\example.txt" using the ASCII encoding, rather than UTF-8.