powershell-utf8-fixer
SKILL.md
PowerShell UTF-8 Fixer
Problem
PowerShell on Windows requires UTF-8 with BOM encoding for scripts containing non-ASCII characters (Korean, Chinese, Japanese, emoji, etc.). Without the BOM (Byte Order Mark), PowerShell interprets the file using the system's default encoding (typically CP949 on Korean Windows), causing character display issues.
Symptoms:
- Korean text appears as
???or garbled characters - Emoji and special characters don't display correctly
Write-Hostoutput shows corrupted text- One script works fine while another with identical code shows garbled text
Root cause: File encoding mismatch
- ✓ UTF-8 with BOM (EF BB BF): PowerShell reads correctly
- ✗ UTF-8 without BOM: PowerShell uses system default encoding → garbled text
Quick Fix
When encountering encoding issues in PowerShell scripts: