Skip to main content
iso8583sim.wire.format

Encoding

Bases: Enum How characters and digits are represented on the wire. | ASCII | 'ascii' | | EBCDIC | 'ebcdic' | | BCD | 'bcd' | | BINARY | 'binary' |

WireFormat

Byte layout of a message. Each part of the message can be encoded independently. Attributes
Encoding
MTI encoding: ASCII, EBCDIC or BCD
str
“binary” for 8 raw bytes per bitmap, or “hex” for 16 hex characters in the text encoding
Encoding
Encoding of LLVAR / LLLVAR length indicators: ASCII, EBCDIC, BCD or BINARY
Encoding
Encoding of numeric field content: ASCII, EBCDIC or BCD
Encoding
Encoding of alphanumeric content: ASCII or EBCDIC
str
“raw” to send binary fields (PIN block, MAC, EMV) as bytes, or “hex” to send them as hex characters in the text encoding
str
Python codec used for EBCDIC (cp037 is US/Canada, cp500 international)
str
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.