Skip to content

Commit e25a030

Browse files
authored
Merge pull request #154 from picqer/fix-code93
Fix couple encodings in Code93
2 parents ec1795f + d9414c3 commit e25a030

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

.github/workflows/phpunit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99

1010
strategy:
1111
matrix:
12-
php-versions: ['7.3', '7.4', '8.0']
12+
php-versions: ['7.3', '7.4', '8.0', '8.1']
1313

1414
steps:
1515
- uses: actions/checkout@v2

src/Types/TypeCode93.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
/*
1010
* CODE 93 - USS-93
1111
* Compact code similar to Code 39
12+
*
13+
* reference: https://en.wikipedia.org/wiki/Code_93#Full_ASCII_Code_93
1214
*/
1315

1416
class TypeCode93 implements TypeInterface
@@ -105,18 +107,18 @@ public function getBarcodeData(string $code): Barcode
105107
chr(33) => chr(129) . 'A',
106108
chr(34) => chr(129) . 'B',
107109
chr(35) => chr(129) . 'C',
108-
chr(36) => chr(129) . 'D',
109-
chr(37) => chr(129) . 'E',
110+
chr(36) => chr(36), // "$"
111+
chr(37) => chr(37), // "%"
110112
chr(38) => chr(129) . 'F',
111113
chr(39) => chr(129) . 'G',
112114
chr(40) => chr(129) . 'H',
113115
chr(41) => chr(129) . 'I',
114116
chr(42) => chr(129) . 'J',
115-
chr(43) => chr(129) . 'K',
117+
chr(43) => chr(43), // "+"
116118
chr(44) => chr(129) . 'L',
117119
chr(45) => '-',
118120
chr(46) => '.',
119-
chr(47) => chr(129) . 'O',
121+
chr(47) => chr(47), // "/"
120122
chr(48) => '0',
121123
chr(49) => '1',
122124
chr(50) => '2',

0 commit comments

Comments
 (0)