emberlabs / barcode

[ARCHIVED] A generic barcode generator library for PHP
MIT License
49 stars 31 forks source link

Code128 not recording '|' character properly #4

Open aranar-pro opened 10 years ago

aranar-pro commented 10 years ago

Code 128 Barcode generated if code contains a '|' character (&#124) does not scan correctly. The codes are visibly different from the same code put in other barcode generators. Scanning the code delivers a code missing the '|' character. Possibly an illegal or unescaped character issue.

aranar-pro commented 10 years ago

in Code128.php changing: else if(strtoupper($this->data) == $this->data) to else if((strtoupper($this->data) == $this->data) && (!preg_match("/|/", $this->data))) fixes the problem.