fix_subtitle_encoding
Repair mojibake — text where UTF-8 bytes were decoded as a single-byte encoding (cp1252/Latin-1 or cp1251). Symptoms: "é", "’", "привет". Returns the repaired text and how many passes were applied.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"content": "<content>"
},
"name": "fix_subtitle_encoding"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| twice | No | Set true when the text was mis-decoded twice (nested mojibake). Default false. | |
| content | Yes | The garbled subtitle text. | |
| read_as | No | Which encoding the file was wrongly read as. Default "auto" (tries cp1252 then cp1251). |