Urgent.News

What's breaking now, across thousands of outlets.

More in Tech

PowerShell on Legacy Chinese Windows: UTF-8 with BOM or Bust

Windows PowerShell 5.1 does not guess encodings. When it loads a .ps1 file, it looks for a byte-order mark. If it finds one, it decodes accordingly.

  • PowerShell 5.1 fails to auto-detect file encodings
  • Chinese Windows uses GBK code page (CP936) by default
  • Fix involves saving .ps1 files as UTF-8 with BOM

More from Wednesday 14 October →