BarcodeGenerator GS1Code128 brings unexpected symbol Error

Good morning,

we´ve got big issues with the Barcode.dll, because one of our customers has companies around the world and when printing the GS1Code128 Barcode we get errors in several countries (different CultureInfos and Encodings). For example in Serbia. I attached an simple example, which allways brings an error. We also go issues in turkey and other countries.

BarcodeGenerator generator = new BarcodeGenerator (EncodeTypes.GS1Code128, “(400)Uzeniny Příbram​”);​
generator.Save(“AI8012_out.png”, BarCodeImageFormat.Png);​

Can you please tell me how to solve this problem for those different symbols which can occure in different countries?

Best regards

Stefan

@SBWDeveloper,
We were able to observe the issue but we need to look into it more. We have logged the issue in our database for investigation and for a fix. Once, we will have some news for you, we will update you in this topic.

This issue has been logged as

BARCODENET-37321 – BarcodeGenerator GS1Code128 brings unexpected symbol Error

Code128 and its data container GS1Code128 only allows to encode 95 ANSI symbols in 128B mode. In this mode only upper and lower Latin(English) symbols are allowed. You can see this in the attached link to wiki.

In this way you cannot encode any Serbian, Russian, Ukrainian, Japanese or Chinese… symbols in Code128 barcode.

To encode Serbian symbols you can use GS1QR code(it has full Unicode support). Or you can replace Serbian symbols by their transliteration to Latin symbols and encode with GS1Code128 encoding.

Here is example how to do this: