This function converts a buffer from one encoding language to another. |
Examples
|
Parameters | Type | Description | Possible values | Example |
---|---|---|---|---|
content | string | Required The file's contents. | A string value. | "hi" |
from_charset | string | The file's current character set encoding.
| Any cPanel-supported character set encoding. |
|
to_charset | string | The character set encoding in which to encode the file. | Any cPanel-supported character set encoding. |
|
discard_illegal | Boolean | Whether to discard any characters that do not transcode correctly. |
| 1 |
transliterate | Boolean | Whether to transcode invaid characters to valid characters in the new character set encoding. |
| 0 |
Return | Type | Description | Possible values | Example |
---|---|---|---|---|
content | string | The file content. | A string value. | "hi" |
charset | string | The file's new character set. | A cPanel-supported character set encoding. | ASCII |
Function information
About this moduleThe About UAPIFind a functionRelated functions |