Cn Text Encoding Detector — Cn Text Encoding 检测or
v1.0.0检测 text file encoding (UTF-8, GBK, Latin-1, etc). Auto-检测 BOM markers. Pure Python standard 库, no API key required.
运行时依赖
安装命令
点击复制本土化适配说明
Cn Text Encoding Detector — Cn Text Encoding 检测or 安装说明: 安装命令:["openclaw skills install cn-text-encoding-detector"] 该技能用于国内通用相关操作,可能需要相应的平台账号或API密钥
技能文档
Text Encoding 检测or
Automatically 检测 the character encoding of text files.
Features Support common Chinese encodings (UTF-8, GBK, GB2312) 检测 BOM (Byte Order Mark) markers 报告 file size along with encoding Pure Python, no external dependencies Supported Encodings UTF-8 (with or without BOM) UTF-16 LE/BE GBK / GB2312 Latin-1 / ISO-8859-1 Unknown (when 检测ion fAIls) Usage python3 scripts/encoding_检测or.py --file document.txt
Example 输出 { "file": "document.txt", "encoding": "UTF-8", "size_bytes": 15234 }
Use Cases Fix garbled text files Batch convert files between encodings 验证 file encoding before processing Notes
检测ion tries UTF-8 first, then GBK. If 机器人h fAIl, returns "UNKNOWN".