Skip to content

Commit

Permalink
Merge pull request #154 from picqer/fix-code93
Browse files Browse the repository at this point in the history
Fix couple encodings in Code93
  • Loading branch information
casperbakker committed May 6, 2022
2 parents ec1795f + d9414c3 commit e25a030
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:

strategy:
matrix:
php-versions: ['7.3', '7.4', '8.0']
php-versions: ['7.3', '7.4', '8.0', '8.1']

steps:
- uses: actions/checkout@v2
Expand Down
10 changes: 6 additions & 4 deletions src/Types/TypeCode93.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
/*
* CODE 93 - USS-93
* Compact code similar to Code 39
*
* reference: https://en.wikipedia.org/wiki/Code_93#Full_ASCII_Code_93
*/

class TypeCode93 implements TypeInterface
Expand Down Expand Up @@ -105,18 +107,18 @@ public function getBarcodeData(string $code): Barcode
chr(33) => chr(129) . 'A',
chr(34) => chr(129) . 'B',
chr(35) => chr(129) . 'C',
chr(36) => chr(129) . 'D',
chr(37) => chr(129) . 'E',
chr(36) => chr(36), // "$"
chr(37) => chr(37), // "%"
chr(38) => chr(129) . 'F',
chr(39) => chr(129) . 'G',
chr(40) => chr(129) . 'H',
chr(41) => chr(129) . 'I',
chr(42) => chr(129) . 'J',
chr(43) => chr(129) . 'K',
chr(43) => chr(43), // "+"
chr(44) => chr(129) . 'L',
chr(45) => '-',
chr(46) => '.',
chr(47) => chr(129) . 'O',
chr(47) => chr(47), // "/"
chr(48) => '0',
chr(49) => '1',
chr(50) => '2',
Expand Down

0 comments on commit e25a030

Please sign in to comment.