The Barcode4J I use:
<dependency> <groupId>net.sf.barcode4j</groupId> <artifactId>barcode4j</artifactId> <version>2.1</version> </dependency>
When I try to generate the datamatrix barcode with following content:
<mp u="02BD2867FB024401A590D59D94E1FFAE" l="de-DE" v="024"></mp>
then the library throws the following exception:
The string pattern i.E.; causes this. I encountred the same error while using Zxing library. I have not found any open source solution so far which does not have this problem. Need real help here.
Exception in thread "main" java.lang.IllegalArgumentException: Illegal character: i (0x0069) at org.krysalis.barcode4j.impl.datamatrix.DataMatrixHighLevelEncoder.illegalCharacter(DataMatrixHighLevelEncoder.java:1087) at org.krysalis.barcode4j.impl.datamatrix.DataMatrixHighLevelEncoder.access$1400(DataMatrixHighLevelEncoder.java:34) at org.krysalis.barcode4j.impl.datamatrix.DataMatrixHighLevelEncoder$EdifactEncoder.encodeChar(DataMatrixHighLevelEncoder.java:730) at org.krysalis.barcode4j.impl.datamatrix.DataMatrixHighLevelEncoder$EdifactEncoder.encode(DataMatrixHighLevelEncoder.java:655) at org.krysalis.barcode4j.impl.datamatrix.DataMatrixHighLevelEncoder.encodeHighLevel(DataMatrixHighLevelEncoder.java:134) at org.krysalis.barcode4j.impl.datamatrix.DataMatrixLogicImpl.generateBarcodeLogic(DataMatrixLogicImpl.java:50) at org.krysalis.barcode4j.impl.datamatrix.DataMatrixBean.generateBarcode(DataMatrixBean.java:128) at BarcodeGenerator.generateDatamatrixWithBarcode4jlib(BarcodeGenerator.java:47) at BarcodeGenerator.main(BarcodeGenerator.java:25)
When I generate the Datamatrix with the attached content then it causes the exception.