How to Generate Barcodes (CODE39) in Unicode Symbols with JavaScript
▌ ▌█▌█▌▌█▌█▌ ▌▌▌▌█▌ ▌█▌▌▌ ▌█▌█▌▌
⇾ Encodes ❛39❜
Barcodes have long been used as means of item identifications as early as in the 1970s. In present day it has been widely implemented as a universal standard across several Global Supply Chain logistics processes and procedures.
CODE39 Barcodes
1 of the earliest forms of Barcodes is CODE39 — with a charset of 44. These characters encompasses the following alphanumerical values:
Alpha: A-Z
(uppercase only. any lowercase characters shall be auto-transformed to uppercase.)
Numerical: 0–9
Other Symbols: + - * / % $ , _
(any single space ' '
is auto-replaced by the underscore '_'
character)
Each character display has the following set of rules to follow:
In addition, each barcode is always prefixed and suffixed with an asterisk *
. E.g. when 2 characters ❛39❜ are actually encoded as CODE39, the displayed barcode renders ❛*39*❜ instead.
Note: Barcode scanners will still read this as ❛39❜ as intended.
While there are open-sourced wrapper Barcode JS libraries JsBarcode, in order to derive the actual mapping for each of the 44 unique characters, variables…