Menu

#51 Illegal character "x" - DataMatrixHighLevelEncoder.illegalCharacter

v1.0 (example)
open
nobody
None
1
2021-08-13
2021-08-13
ZA
No

Hello,
we are using the library "barcode4j" version 2.1 for several years in order to create DataMatrix-Code - QR-Code and it works very good.
But in some cases we are getting the error (at the end of this message)
If the following text is included in QR-Code:
"2.0 = 2 x 6" (without quotation marks)
there is an error:
For example with following texts there are no problems:
"2.0 = 2x6" --> same as above but without spaces before and after "x"
"2 = 2 x 6" --> instead of 2.0 --> just 2

Could You please help us to solve that problem?
Is there some workaround or maybe some configuration possibilities?

Because upper text should be a simple arbitrary text, but it was interpret otherwise probably with some patterns.


Caused by: java.lang.IllegalArgumentException: Illegal character: x (0x0078)
at org.krysalis.barcode4j.impl.datamatrix.DataMatrixHighLevelEncoder.illegalCharacter(DataMatrixHighLevelEncoder.java:1087) ~[barcode4j-2.1.jar:2.1.0]
at org.krysalis.barcode4j.impl.datamatrix.DataMatrixHighLevelEncoder.access$1400(DataMatrixHighLevelEncoder.java:34) ~[barcode4j-2.1.jar:2.1.0]
at org.krysalis.barcode4j.impl.datamatrix.DataMatrixHighLevelEncoder$EdifactEncoder.encodeChar(DataMatrixHighLevelEncoder.java:730) ~[barcode4j-2.1.jar:2.1.0]
at org.krysalis.barcode4j.impl.datamatrix.DataMatrixHighLevelEncoder$EdifactEncoder.encode(DataMatrixHighLevelEncoder.java:655) ~[barcode4j-2.1.jar:2.1.0]
at org.krysalis.barcode4j.impl.datamatrix.DataMatrixHighLevelEncoder.encodeHighLevel(DataMatrixHighLevelEncoder.java:134) ~[barcode4j-2.1.jar:2.1.0]
at org.krysalis.barcode4j.impl.datamatrix.DataMatrixLogicImpl.generateBarcodeLogic(DataMatrixLogicImpl.java:50) ~[barcode4j-2.1.jar:2.1.0]
at org.krysalis.barcode4j.impl.datamatrix.DataMatrixBean.generateBarcode(DataMatrixBean.java:128) ~[barcode4j-2.1.jar:2.1.0]
at net.sf.jasperreports.components.barcode4j.BarcodeSVGImageProducer.createImage(BarcodeSVGImageProducer.java:67) ~[jasperreports-javaflow-6.3.0.jar:6.3.0]
...


Discussion


Log in to post a comment.