Issue When Executing Powershell Scripts Amongst Characters Exterior Of A-Z

By Thursday, August 30, 2018 on August 30, 2018 Tags:
Issue When Executing Powershell Scripts Amongst Characters Exterior Of A-Z.

I convey a PowerShell script inwards which I decease a parameter to ascendance containing the Norwegian graphic symbol ø, where the ascendance sets a value on a spider web page.

When checking the result, it looks similar this:

Hvem gjør hva

Clearly an encoding issue. My .ps1 file was saved inwards UTF-8, in addition to to become inwards piece of employment I changed it to UTF-8 amongst BOM (byte lodge mark). This mode PowerShell tin correctly respect the script every bit beingness inwards UTF-8 in addition to encode the characters correct. To modify encoding operate for event VSCode or Notepad++.

Summary

If y'all convey characters exterior of a-z inwards your scripts, hold upwardly certain to salve them every bit UTF-8 amongst BOM to avoid whatsoever encoding issues.

Cover photograph past times Krisitan Strand at Unsplash

Thanks for reading : Issue When Executing Powershell Scripts Amongst Characters Exterior Of A-Z


Related Post