Install
openclaw skills install cn-text-encoding-detectorDetect text file encoding (UTF-8, GBK, Latin-1, etc). Auto-detect BOM markers. Pure Python standard library, no API key required.
openclaw skills install cn-text-encoding-detectorAutomatically detect the character encoding of text files.
python3 scripts/encoding_detector.py --file document.txt
{
"file": "document.txt",
"encoding": "UTF-8",
"size_bytes": 15234
}
Detection tries UTF-8 first, then GBK. If both fail, returns "UNKNOWN".