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.
Asked: 2023-02-19 11:00:00 +0000
Seen: 14 times
Last updated: Apr 09 '23