Bugs item #1819183, was opened at 2007-10-24 12:04
Message generated for change (Settings changed) made by jmaerki
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=615504&aid=1819183&group_id=96670
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: Default encoding type in DataMatrix
Initial Comment:
In HighLevelEncoder Class (DataMatrixHighLevelEncoder)
line #94:
int encodingMode = ASCII_ENCODATION; //Default mode
And if I try to encode String with unicode characters, I get an Exception. I've found temporary solution: I use BASE256_ENCODATION as default. I suppose, there's something wrong with LookAheadTest(String, int, int). Maybe, I'll inspect it, if you won't react to this bugReport but It'd be good if you'd fix this bug yourselves. :)
----------------------------------------------------------------------
Comment By: Giuseppe Sacco (eppesuig)
Date: 2008-03-21 09:22
Message:
Logged In: YES
user_id=220823
Originator: NO
I just checked out the latest CVS code and this problem have been fixed.
----------------------------------------------------------------------
Comment By: Giuseppe Sacco (eppesuig)
Date: 2008-03-20 10:00
Message:
Logged In: YES
user_id=220823
Originator: NO
Hi all,
we probably found the same problem using the string ISO-8859-1
"NEOS==APPEND&&numpages==1&&cover==false&&docId==polizze&&ramo==0002&&polizzanr==0000001&&cdProd==102B"
Caused by: java.lang.IllegalArgumentException: Illegal character: n
at
org.krysalis.barcode4j.impl.datamatrix.DataMatrixHighLevelEncoder$EdifactEncoder.encodeChar(DataMatrixHighLevelEncoder.java:628)
at
org.krysalis.barcode4j.impl.datamatrix.DataMatrixHighLevelEncoder$EdifactEncoder.encode(DataMatrixHighLevelEncoder.java:565)
at
org.krysalis.barcode4j.impl.datamatrix.DataMatrixHighLevelEncoder.encodeHighLevel(DataMatrixHighLevelEncoder.java:97)
at
org.krysalis.barcode4j.impl.datamatrix.DataMatrixLogicImpl.generateBarcodeLogic(DataMatrixLogicImpl.java:41)
at
org.krysalis.barcode4j.impl.datamatrix.DataMatrixBean.generateBarcode(DataMatrixBean.java:56)
at
packs.BarcodeTools.defineBarcode4JBarcode(BarcodeTools.java:251)
... 10 more
Bye,
Giuseppe
----------------------------------------------------------------------
Comment By: Jeremias Mi (jmaerki)
Date: 2007-10-24 14:09
Message:
Logged In: YES
user_id=225352
Originator: NO
I don't think that's a bug. What kind of message did you want to encode?
You have to note that, by default, only characters from the ISO-8859-1
character set are allowed for DataMatrix symbols. This is documented at
http://barcode4j.sourceforge.net/2.0/symbol-datamatrix.html. You cannot
just encode any random Unicode character without further precautions. Also
documented is that Barcode4J currently doesn't support ECI functionality
which I assume may help in encoding additional characters from other
character sets. Maybe there's even an ECI that allows the use of UTF-8
which would then allow the use of all Unicode characters. But since the ECI
specification has to be bought I haven't bothered myself with it, yet.
Another direction that Barcode4J could be extended into is supporting a
byte array instead of a String as input parameter. That would let you
encode the Unicode text to UTF-8 and the byte array would then
automatically be encoded using the Base256 encoding. But that would be a
request for enhancement. Can you sponsor the work necessary? :-) Still, you
have to make sure that the decoding application/device can deal with what
you've encoded, i.e. properly decode UTF-8 to Unicode.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=615504&aid=1819183&group_id=96670
|