convert_file_encoding
Convert file encodings between formats like UTF-8, GBK, and GB2312. Specify source and target encodings, error handling, and mismatch policy for controlled conversion.
Instructions
Convert files between encodings (utf-8, gbk, gb2312).
Args: file_paths: List of absolute file paths. source_encoding: Current encoding. target_encoding: Desired encoding. error_handling: "strict" | "replace" | "ignore" mismatch_policy: "warn-skip" | "fail-fast" | "force"
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": {
"file_paths": "<file_paths>",
"source_encoding": "<source_encoding>",
"target_encoding": "<target_encoding>"
},
"name": "convert_file_encoding"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_paths | Yes | ||
| source_encoding | Yes | ||
| target_encoding | Yes | ||
| error_handling | No | strict | |
| mismatch_policy | No | warn-skip |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |