iso8583sim.wire.format
Encoding
Bases: Enum
How characters and digits are represented on the wire.
| ASCII | 'ascii' |
| EBCDIC | 'ebcdic' |
| BCD | 'bcd' |
| BINARY | 'binary' |
Byte layout of a message. Each part of the message can be encoded independently.
Attributes
MTI encoding: ASCII, EBCDIC or BCD
“binary” for 8 raw bytes per bitmap, or “hex” for 16 hex characters in
the text encoding
Encoding of LLVAR / LLLVAR length indicators: ASCII, EBCDIC, BCD or BINARY
Encoding of numeric field content: ASCII, EBCDIC or BCD
Encoding of alphanumeric content: ASCII or EBCDIC
“raw” to send binary fields (PIN block, MAC, EMV) as bytes, or “hex”
to send them as hex characters in the text encoding
Python codec used for EBCDIC (cp037 is US/Canada, cp500 international)
Filler nibble position for odd-length variable BCD fields
ascii_hex()
Everything as ASCII text with a hex bitmap: the byte form of this library’s string messages.
ascii_binary()
ASCII text and numbers with a binary bitmap and raw binary fields. A common host format.
bcd()
BCD MTI, numbers and lengths, binary bitmap, ASCII text. Typical of POS terminal links.
ebcdic()
EBCDIC text and numbers with a binary bitmap. Used by IBM mainframe hosts.
preset()
Look up a preset by name: ascii-hex, ascii-binary, bcd or ebcdic.