[ krysalis-Bugs-942246 ] A FNC_1 character inside the barcode gives an error

"SourceForge.net" <[email protected]>
Newsgroups gmane.comp.krysalis.devel
Message-ID <[email protected]>
Bugs item #942246, was opened at 2004-04-26 13:28
Message generated for change (Settings changed) made by jmaerki
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=423515&aid=942246&group_id=36516

Category: barcode
Group: release
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Jeremias Märki (jmaerki)
Summary: A FNC_1 character inside the barcode gives an error

Initial Comment:
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
[email protected]


----------------------------------------------------------------------

>Comment By: Jeremias Märki (jmaerki)
Date: 2004-04-28 22:26

Message:
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

----------------------------------------------------------------------

Comment By: Jeremias Märki (jmaerki)
Date: 2004-04-27 22:46

Message:
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

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=423515&aid=942246&group_id=36516


-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.