Subscribe to RSS feed

splitbrain.org - electronic brain surgery since 2001

Seven Years Later

This must be some kind of record. About seven years ago I ported the JavaScript port of a C library for SemaCodes to PHP. Back then I encountered a bug in the original C lib that I wasn't able to fix and wrote to the mailing list. Unfortunately the library was pretty much unmaintained and I never got an answer.

Until today, when I got a mail from Jesse Crews:

Andreas Gohr, Fri Jun 29 15:56:47 CEST 2007:

I have a problem with the DataMatrix exncoder:

Underscores are not encoded correctly in the barcode at all times. If the underscore is the 4th or later character in the input, it will be encoded as a carret char (^).
[snip]
Please, let me know if I can give any more information.



Do you remember this? I recently started using iec16022 and encountered this bug. In the remote event that you haven't lost interest nearly 7 years later, the encoding fault was caused by set 2 being incomplete. '_' is code 26, but '^' and FNC1 were both missing from the set, causing text (C40 and text) encodings to encode '_' as code 25 ('^') instead of the correct code 26.

iec16022ecc200.c, line 257 reads:
*s2 = ”!\”#$%&'()*+,-./:;⇔?@[\\]_”
but should be *s2 = ”!\”#$%&'()*+,-./:;⇔?@[\\]^_\232”

Awesome. Even though QRCode is more or less the defacto standard nowadays, my PHP semacode library finally works. Better 7 years late, than never =).

The updated code is available in the Github Repository.

Tags:
semacode, php, cellphone, bugfix
Similar posts:
Posted on Wednesday, April the 16th 2014 (3 months ago).

Comments?

blog comments powered by Disqus