powershell-utf8-fixer

Add UTF-8 BOM to PowerShell .ps1 files recursively.

13|3|Updated Jan 10, 2026
One-click install
npx skills add https://github.com/Mineru98/skills-store --skill powershell-utf8-fixer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: powershell-utf8-fixer
Source: https://github.com/Mineru98/skills-store/tree/main/.claude/skills/powershell-utf8-fixer
Command: npx skills add https://github.com/Mineru98/skills-store --skill powershell-utf8-fixer

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

PowerShell scripts saved without UTF-8 BOM can render non-ASCII characters (Korean, Chinese, Japanese, emoji) incorrectly, causing garbled output and maintenance headaches.

Core Features & Use Cases

  • Detects whether .ps1 files are encoded with UTF-8 BOM, UTF-8 without BOM, or UTF-16 and reports findings.
  • Automatically adds UTF-8 BOM to files lacking it, preserving content.
  • Recursively processes directories of PowerShell scripts to ensure encoding consistency across a project.
  • Suitable for new script creation, CI pipelines, and pre-commit checks to prevent encoding-related issues.

Quick Start

Run the fixer on your PowerShell project to ensure all .ps1 files have UTF-8 BOM.

Frequently Asked Questions about powershell-utf8-fixer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does my PowerShell script output garbled non-ASCII characters?

PowerShell scripts without UTF-8 BOM often render non-ASCII characters incorrectly, causing garbled output. Adding a UTF-8 BOM to your .ps1 files ensures Windows PowerShell correctly interprets and displays Korean, Chinese, Japanese, and emoji characters.

How do I add UTF-8 BOM to existing PowerShell scripts?

You can add UTF-8 BOM to existing PowerShell scripts by running an encoding fixer that reads .ps1 file contents as UTF-8 and automatically prepends the BOM when missing. It processes directories recursively to ensure encoding consistency across your entire project.

Can I check PowerShell file encoding for UTF-8 BOM across a project directory?

Yes, you can check PowerShell file encoding across a project directory by recursively scanning .ps1 files. The tool detects whether files are encoded with UTF-8 BOM, UTF-8 without BOM, or UTF-16, and reports findings before applying any fixes.

Does the PowerShell encoding fixer work for CI pipelines and pre-commit checks?

The PowerShell encoding fixer is suitable for CI pipelines and pre-commit checks to prevent encoding-related issues. It processes directories recursively, prints a concise status log, and ensures all .ps1 files have UTF-8 BOM before integration.

What is the best way to fix encoding issues for non-ASCII text in Windows PowerShell?

The best way to fix encoding issues for non-ASCII text in Windows PowerShell is to ensure your .ps1 files are saved with UTF-8 BOM. An automated script fixer can detect missing BOMs and prepend them while preserving the original file content.

Will adding a UTF-8 BOM modify the existing content of my .ps1 files?

Adding a UTF-8 BOM does not modify the existing content of your .ps1 files. The fixer reads the file contents as UTF-8 and only prepends the BOM bytes when missing, preserving your script logic and text without altering the original data.