Patent ID: 7973946

Claim:
A method for parsing data formatted in a plurality of encoding schemes at a printer comprising: receiving data from at least one host computer at the printer, wherein at least a first portion of the data is encoded in an ASCII transparent encoding scheme and wherein at least a second portion of the data is encoded in a non-ASCII transparent encoding scheme; maintaining a buffer of the received data, the received data comprising a plurality of characters and at least one printer control command associated with each of the ASCII transparent encoding scheme and the non-ASCII transparent encoding scheme; maintaining a parser state, an endianness state, and an ASCII transparent type state, wherein the parser state defines parsed data as ASCII transparent or non-ASCII transparent, wherein the endianness state defines the endianness of most recently parsed non-ASCII transparent data, and wherein the ASCII transparent type state defines the ASCII transparent encoding scheme of most recently parsed ASCII transparent data; and parsing the data based on at least one of the plurality of characters and at least one printer control command and based on the parser state, the endianness state, and the ASCII transparent type state.