#59 A FNC_1 character inside the barcode gives an error

release
closed-fixed
barcode (4)
5
2004-04-28
2004-04-26
Anonymous
No

Hi,

If you have a FNC_1 character somewhere inside a
code128 barcode, you will in some cases eventually get
an ArrayIndexOutOfBoundsException. This is because
Character.digit gives -1 as result of this character in
row 218 in DefaultCode128Encoder.java. If the value
next to the FNC_1 character is 0, then encoded[respos]
will be -1 and this is the thing that later gives the
exception.

My barcode example:
ń020456789012341837100ń3101000200, where ń is the
FNC_1 character.

/Marc
marc@expertsystem.se

Discussion

  • Jeremias Märki

    Jeremias Märki - 2004-04-27
    • status: open --> open-accepted
     
  • Jeremias Märki

    Jeremias Märki - 2004-04-27

    Logged In: YES
    user_id=225352

    Thanks for spotting this. It's not the zero after FNC_1 that is
    the problem. It's the FNC_1 in the second position of a would-
    be duo of digits encoded in codeset C. The algorithm fails to
    handle the FNC_1 character in all situations. I've started
    fixing the algorithm but haven't succeeded in all situations,
    yet. I'll try again later as soon as I have more time (probably
    on Friday).

    Jeremias Maerki

     
  • Jeremias Märki

    Jeremias Märki - 2004-04-28

    Logged In: YES
    user_id=225352

    I think I have been able to fix the bug. It's fixed in
    Barcode4J's CVS repository. Please be aware that the krysalis-
    barcode CVS module is frozen. See
    http://sourceforge.net/projects/barcode4j/. I still hope I can
    find the time soon to do another beta before finally releasing
    1.0 final.

    Jeremias Maerki

     
  • Jeremias Märki

    Jeremias Märki - 2004-04-28
    • status: open-accepted --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks