Encode the null function char (ASCII 0) in a barcode

Skip to main content
< Back
You are here:
Print

Encode the null function char (ASCII 0) in a barcode

Solution(s):

Null characters may be encoded in Code 39Code 128, and most 2D barcode types such as QR Code and Data Matrix. However, the null character represents the end of a data string in most applications. Therefore, any data encoded after it will usually be truncated by the barcode scanner or the application itself.

In all IDAutomation 2D matrix barcode types, such as Data Matrix and QR Code, the format ~dNNN represents the ASCII character encoded, where NNN is the ASCII number. For example, ~d009 encodes a tab, ~d013 encodes a return, and ~d000 encodes the null character.

In Code 128, the null character can be encoded as ~000. In Code 39, it can be encoded as +A with Extended Code 39.

When encoding these hidden control commands, IDAutomation recommends testing the result with the Barcode Scanner Decoder App because it can show these non-printable ASCII commands in the data, such as in the example below, which reveals the GS, RS, and EOT functions.

The Barcode Scanner Decoder App shows non-printable ASCII commands.