File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<?php
22/**
3- * Adapated from Java implementation of Telepen
4- * by <rstuart114@gmail.com> Robin Stuart by
5- * Darren Stephens <darren.stephens@durham.ac.uk>
6- * at https://github.com/woo-j/OkapiBarcode which used the
3+ * Adapted by Darren Stephens <darren.stephens@durham.ac.uk>
4+ * from Java implementation of Telepen by <rstuart114@gmail.com> Robin Stuart
5+ * at https://github.com/woo-j/OkapiBarcode which uses the
76 * Apache License 2.0 http://www.apache.org/licenses/LICENSE-2.0
87 *
98 * Implements Telepen (also known as Telepen Alpha), and Telepen Numeric.
2221
2322define ('TELEPEN_START_CHAR ' , '_ ' );
2423define ('TELEPEN_STOP_CHAR ' , 'z ' );
25- define ('TELEPEN_ALPHA ' , '' );
24+ define ('TELEPEN_ALPHA ' , 'alpha ' );
2625define ('TELEPEN_NUMERIC ' , 'numeric ' );
2726
2827class TypeTelepen implements TypeInterface
@@ -73,7 +72,7 @@ protected function encode($code) : string
7372 protected function encodeAlpha ($ code ) : string
7473 {
7574
76- if (!preg_match ('/[ -~]+/ ' , $ code )) { // everything from ASCII0 -ASCII127
75+ if (!preg_match ('/[ -~]+/ ' , $ code )) { // everything from ASCII32 -ASCII127
7776 throw new InvalidFormatException ("Invalid characters in data " );
7877 }
7978
You can’t perform that action at this time.
0 commit comments