Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Character issue in v2.4.0 #166

Closed
erangalp opened this issue Jul 7, 2022 · 2 comments
Closed

Character issue in v2.4.0 #166

erangalp opened this issue Jul 7, 2022 · 2 comments

Comments

@erangalp
Copy link

erangalp commented Jul 7, 2022

After updating from v2.2.0 to v.2.4.0, when we try to encode a string such as "id857485" to a barcode, we get the following exception thrown - "Char i is unsupported"
Trace -
#0 /var/www/maonrails/html/library/vendor/picqer/php-barcode-generator/src/BarcodeGenerator.php(103): Picqer\Barcode\Types\TypeCode39->getBarcodeData()
#1 /var/www/maonrails/html/library/vendor/picqer/php-barcode-generator/src/BarcodeGeneratorSVG.php(20): Picqer\Barcode\BarcodeGenerator->getBarcodeData()

Downgrading back to v2.2.0 resolves this. Would appreciate it if you could take a look and see if you can make it work on the latest version as well

@Bernhard-Krop
Copy link
Contributor

Bernhard-Krop commented Jul 11, 2022

Hi @erangalp,

barcode type Code39 supports only uppercase letters. Throwing an exception after an unsupported character occurred is the right way.

To fix your problem, you have to either provide a string with only uppercase letters, or use Code39Extended, which supports lowercase letters.

Kind regards,

Bernhard Krop

@erangalp
Copy link
Author

Understood, thanks for the explanation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants