Chinese Encoding Handler for Openclaw

A specialized toolkit to detect, read, and write Chinese text correctly in PowerShell environments without character corruption.

petersunpingww-droid
v1.0.0
Mar 30, 2026
0
695
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install chinese-encoding-handler

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install chinese-encoding-handler using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Chinese Encoding Handler?

The Chinese Encoding Handler is a robust utility designed to eliminate character corruption, often referred to as garbled text, when working with Chinese content in PowerShell. By providing automated encoding detection and safe file I/O operations, it ensures that your Openclaw Skills work seamlessly across different localized environments and legacy systems.

This tool is specifically engineered for developers who need to manage configuration files, logs, or data sources containing non-ASCII characters. It bridges the gap between different encoding standards like GBK, GB2312, and UTF-8, ensuring that Openclaw Skills can process and display information accurately regardless of the underlying terminal settings.

Chinese Encoding Handler Use Cases

  • Encountering garbled text while reading local Chinese text files.
  • Writing Chinese content that becomes unreadable in standard Windows text editors.
  • Fixing square boxes or display errors in the PowerShell terminal output.
  • Automatically identifying the encoding format of legacy data files for migration.
  • Processing localized configuration files within automated CI/CD pipelines as part of Openclaw Skills deployments.

How Chinese Encoding Handler Works

  1. The tool first scans for a Byte Order Mark (BOM) at the start of the file to identify standard UTF formats.
  2. In the absence of a BOM, it performs a statistical content analysis to detect byte sequence patterns typical of GBK or UTF-8.
  3. It assigns a confidence score (0-100%) to the detected encoding to ensure high reliability before processing.
  4. Safe-read and safe-write modules use the detected parameters to handle file streams without data loss.
  5. Terminal fix scripts adjust the active code page (e.g., to 65001) to enable proper multi-byte character rendering in the console.

Chinese Encoding Handler Setup

To integrate this with your Openclaw Skills environment, use the following PowerShell commands:

# Detect the encoding of a specific file
.\scripts\encoding-detector.ps1 -Path "C:\path\to\your\file.txt"

# Safely read a file with Chinese characters
.\scripts\safe-read.ps1 -Path "C:\path\to\your\file.txt"

# Permanently fix the terminal display (requires Administrator privileges)
.\scripts\terminal-fix.ps1 -Permanent

Chinese Encoding Handler Data Schema & Taxonomy

The skill manages data using specific scripts and generates metadata regarding file encoding status:

Script Input Key Output/Metadata
encoding-detector.ps1 File Path Detected Encoding, Confidence Percentage
safe-read.ps1 File Path UTF-8 String Output
safe-write.ps1 String Content File saved as UTF-8-BOM by default
terminal-fix.ps1 Switch Flags Registry/Session CodePage update (65001)

Chinese Encoding Handler Advanced Features

  • Permanent system-level terminal repairs to ensure Openclaw Skills always display Chinese characters correctly.
  • Cross-platform support for Windows PowerShell 5.1, PowerShell 7+, and Linux/macOS environments.
  • Automated BOM injection (UTF-8-BOM) to maximize compatibility with legacy Windows applications like Excel and Notepad.
  • Structured error handling with specific codes (ERR-001 to ERR-005) for easier debugging in automated workflows.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*