# Iso8859 semantic encode

`iso8859-semantic-encode` · version 1.0.0 · Encoding & checksums · free, no key needed

Encode logical Unicode text as ISO-8859-6 Arabic, ISO-8859-8 Hebrew, or ISO-8859-11 Thai bytes.

**Use when you need to: encode Arabic text to ISO bytes · encode Hebrew text to ISO bytes · encode Thai text to ISO bytes.**

## Decide before calling

Read the [versioned contract](/v1/tools/iso8859-semantic-encode/versions/1.0.0) and the supported scope below. Reuse `iso8859-semantic-encode@1.0.0` when your input, required output and limits match it. Choose another approach for an unsupported operation.

## Explain the choice

"I can use `iso8859-semantic-encode@1.0.0` for encode Arabic text to ISO bytes. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."

## Supported

- encode Arabic text to ISO bytes
- encode Hebrew text to ISO bytes
- encode Thai text to ISO bytes
- logical Unicode to legacy byte stream
- replace unencodable Unicode scalars
- write ISO part 6 byte data

## Not supported

- Unicode normalization or transliteration
- bidirectional display shaping or visual reordering
- automatic language or encoding detection

## Behavior

- Conversions operate on logical code points only; no bidi shaping, visual reordering, normalization, or language guessing.
- Strict mode rejects the first undefined byte or unrepresentable character; replacement mode uses U+FFFD when decoding and byte 3f when encoding.
- Omitted mode means strict. Check reports every undefined byte offset.
- Base64 must be canonical and bytes are reported in lowercase hexadecimal diagnostics.
- The max_input_bytes limit is the UTF-8 byte length of text; max_items is its Unicode scalar count.
- Disclaimer: format transform only; provides no confidentiality, integrity, or authenticity.

## Input

- `encoding` (one of "iso-8859-6", "iso-8859-8", "iso-8859-11", required)
- `text` (string, required): max length 4096
- `mode` (one of "strict", "replacement", optional)

## Output

- `bytes_base64` (string, required): max length 5464
- `replacements` (integer, required): min 0; max 4096
- `standard_version` (constant "ISO/IEC 8859-6:1999; ISO/IEC 8859-8:1999; ISO/IEC 8859-11:2001", required)

## Limits

- max input bytes: 4096
- max output bytes: 16384
- max items: 4096

## Example

Request input:

```json
{
  "encoding": "iso-8859-11",
  "text": "ไทย"
}
```

Response:

```json
{
  "result": {
    "bytes_base64": "5LfC",
    "replacements": 0,
    "standard_version": "ISO/IEC 8859-6:1999; ISO/IEC 8859-8:1999; ISO/IEC 8859-11:2001"
  }
}
```

## How to call it

### MCP

Connect `https://computefirst.net/mcp` ([setup](/docs#connect)), then call `execute` with:

```json
{
  "id": "iso8859-semantic-encode",
  "version": "1.0.0",
  "input": {
    "encoding": "iso-8859-11",
    "text": "ไทย"
  }
}
```

### HTTP (no key)

```sh
curl -X POST https://computefirst.net/v1/tools/iso8859-semantic-encode/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"encoding":"iso-8859-11","text":"ไทย"}'
```

The machine-readable contract is at [/v1/tools/iso8859-semantic-encode/versions/1.0.0](/v1/tools/iso8859-semantic-encode/versions/1.0.0).

### CLI

```sh
node cli.mjs run iso8859-semantic-encode 1.0.0 --input input.json --base-url https://computefirst.net
```

Get the client at [/clients/cli/](/clients/cli/).

## Related tools

- [Iso8859 semantic decode](/tools/iso8859-semantic-decode): Decode ISO-8859-6 Arabic, ISO-8859-8 Hebrew, or ISO-8859-11 Thai bytes into logical Unicode text.
- [Iso8859 europe encode](/tools/iso8859-europe-encode): Encode ISO-8859-2, -3, -4, -10, -13, or -16 using pinned published character tables.
- [Iso8859 europe decode](/tools/iso8859-europe-decode): Decode ISO-8859-2, -3, -4, -10, -13, or -16 using pinned published character tables.
- [Bech32 encode](/tools/bech32-encode): Encode lowercase HRP and 5-bit data as Bech32 or Bech32m text using that checksum.
- [Utf32 encode](/tools/utf32-encode): Encode Unicode scalar text as bit-exact UTF-32LE or UTF-32BE base64 bytes with an optional BOM.
- [Asn1 oid format](/tools/asn1-oid-format): Format numeric object identifier arcs as dotted text or brace notation.
