Update buffer encoding

This function converts a buffer from one encoding language to another.

Important:

When you disable the File Storage role, the system disables this function.

Authorizations:
query Parameters
content
required
string

The file's contents.

Example: content=hi
discard_illegal
integer

Whether to discard any characters that do not transcode correctly.

Enum: 0 1
Example: discard_illegal=1
from_charset
string

The file's current character set encoding.

Example: from_charset=UTF-8
to_charset
string

The character set encoding in which to encode the file.

Example: to_charset=ASCII
transliterate
integer

Whether to transcode invalid characters to valid characters in the new character set encoding.

Enum: 0 1
Example: transliterate=0

Responses

Response Schema: application/json
apiversion
integer

The version of the API.

func
string

The name of the method called.

module
string

The name of the module called.

object

Request samples

uapi --output=jsonpretty \
  --user=username \
  Fileman \
  transcode \
  content='hi'

Response samples

Content type
application/json
{
  • "apiversion": 3,
  • "func": "transcode",
  • "module": "Fileman",
  • "result": {
    • "data": {
      • "charset": "ASCII",
      • "content": "hi"
      },
    • "errors": null,
    • "messages": null,
    • "metadata": { },
    • "status": 1,
    • "warnings": null
    }
}