picqer / php-barcode-generator

Barcode generator in PHP that is easy to use, non-bloated and framework independent.
GNU Lesser General Public License v3.0
1.67k stars 402 forks source link

Code 128-Auto format error #61

Closed ppsleep closed 4 years ago

ppsleep commented 6 years ago

Example code:

$Barcode = new Barcode();
$code = $Barcode->barcode_c128('12345' . chr(23) . '5678');

We expect to return an array as

Array
(
    [0] => 105
    [1] => 12
    [2] => 34
    [3] => 100
    [4] => 21
    [5] => 101
    [6] => 87
    [7] => 99
    [8] => 56
    [9] => 78
    [10] => 25
    [11] => 106
    [12] => 107
)

But the result is

Array ( [0] => 105 [1] => 12 [2] => 34 [3] => 100 [4] => 21 [5] => 98 [6] => 87 [7] => 99 [8] => 56 [9] => 78 [10] => 25 [11] => 106 [12] => 107 )