public sealed class ZplTextEncoding : Encoding
Encoding of ZPL printer bytes as a Zebra printer reads them: every byte is decoded with the single-byte code page of the ^CI that is active at its position (power-up ^CI0 = Code Page 850, ^CI27 = 1252, ^CI31 = 1250, ^CI33 = 1251, ^CI34 = 1253, ^CI35 = 1254, ^CI36 = 1255). Encoding the decoded text gives the same bytes back, so tools that rewrite ZPL (format, redact, gs1 migrate) keep the field data byte-identical.
Constructors
| Signature | Description |
# ZplTextEncoding(int defaultCodePage = 850) | defaultCodePage: Code page before the first ^CI (850 like a Zebra printer at power-up). |
Properties
Methods
| Method Signature | Returns | Description |
static # Decode(byte[] data, out Encoding encoding, int defaultCodePage = 850) | string | Decodes ZPL bytes: a byte order mark (UTF-8, UTF-16) or valid UTF-8 with non-ASCII bytes selects Unicode, anything else is read like a printer with ZplTextEncoding. encoding encodes the text back. |
# GetByteCount(char[] chars, int index, int count) | int | |
# GetBytes(char[] chars, int charIndex, int charCount, byte[] bytes, int byteIndex) | int | |
# GetCharCount(byte[] bytes, int index, int count) | int | |
# GetChars(byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex) | int | |
# GetMaxByteCount(int charCount) | int | |
# GetMaxCharCount(int byteCount) | int | |