Throughout the Chilkat API there are method arguments and properties to indicate an encoding. These are encodings for binary data such as “hex”, “base64”, etc.
Note: These are not character encodings. A character encoding, such as “utf-8” indicates the byte representation of a character. A binary encoding, such as “base64”, represents non-character binary data in printable string form.
Wherever an encoding method argument or property exists, the list of valid encodings supported by Chilkat are as follows:
- qp (for quoted-printable)
- url (for url-encoding)
- Q (for MIME Q-Encoding)
- B (for MIME B-Encoding)
- fingerprint (added in Chilkat v22.214.171.124)
- decimal (added in Chilkat v126.96.36.199)
- eda (added in Chilkat v188.8.131.52, for encoding/decoding to the UN/EDIFACT Syntax Level A character set)
- json (added in Chilkat v184.108.40.206, for escaping and unescaping JSON strings)
- decList (added in Chilkat v220.127.116.11. See the notes below.)
- base64_mime (added in Chilkat v18.104.22.168. Same as “base64” but the output is in lines just as it would appear in MIME or in a PEM.)
Chilkat is case-insensitive for recognizing an encoding by name. For example “Base64” and “base64” are both recognized as “base64”.
The “fingerprint” encoding is a lowercase hex encoding where each hex digit is separated by a colon character. For example: 6a:de:e0:af:56:f8:0c:04:11:5b:ef:4d:49:ad:09:23
The “decimal” encoding is for converting large decimal integers to/from a big-endian binary representation. For example, the decimal string “72623859790382856” converts to the bytes 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08.
The “decList” encoding is for converting comma-separated lists of decimal integers to bytes and back. For example, “84, 104, 101, 32, 116, 114, 117, 101, 32, 115, 105, 103, 110”. Each decimal integer is a value from 0 to 255.