detect_encoding
Auto-detect file encoding with confidence score and BOM detection. Use this tool first when encountering garbled text or replacement characters to determine the correct encoding before reading the file.
Instructions
Auto-detect file encoding with confidence score (0-100) and BOM detection. ALWAYS use this first when encountering garbled text or � characters. Use before read_text_file to determine the correct encoding. Parameters: path (required), mode (sample=fast default, chunked=thorough, full=entire file).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | ||
| path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| has_bom | Yes | ||
| encoding | Yes | ||
| confidence | Yes |