Write Unicode Barcodes

IronBarcode empowers developers by supporting the writing of Unicode characters for barcode generators and writers. This convenience allows developers to write in multiple languages, making it possible for products with labels in both Japan and Egypt to use the same barcode. It also eliminates the need to convert text to ASCII or another lossy format, streamlining the process efficiently and eliminating unnecessary steps.

Some of the most common languages that are used in Unicode are:

  • Hindi
  • Chinese (many variants)
  • Arabic
  • Japanese
  • Thai

The first step to creating a Unicode barcode with IronBarcode is to define the string value you want the barcode to have. In this example, we're using a mix of English, Chinese, and Arabic as a single string to demonstrate the flexibility of IronBarcode.

The second step is to create an instance of BarcodeWriter, then call the method CreateBarcode to input the string defined in the first step and the type of barcode. Do note that in order to create a Unicode barcode, only certain types of barcode encoding are allowed. The recommended formats are either BarcodeWriterEncoding.DataMatrix, BarcodeWriterEncoding.PDF417, and BarcodeWriterEncoding.QRCode as shown above. Linear barcodes, such as Code 128 and Code 39, do not support Unicode and are limited to ASCII, which requires workarounds.

The third and final step is to save the barcode as a JPEG by calling SaveAsImage with the desired file name as the parameter. In this instance, it would be Unicode.jpeg.

For more examples, check the How-to Guide on using IronBarcode with C#.