Our Customers
Contact Us Email: support@barcodelib.com
Home > .NET Barcode > C# Barcoding Guide > C# Unicode Encoding > Use C# Class Code to Encode Unicode into Data Matrix Barcode
Download Barcode for .NET Suite Trial

C# Data Matrix Barcode Unicode Encoding

How to Use Visual C# Class Library to Generate Data Matrix and Encode Unicode String
  • Compatible with Visual Studio 2005/2008/2010 .NET Framework barcode generation projects
  • Able to generate high print-quality Data Matrix barcode in C# for .NET Web & Windows programs
  • Support creating & adding Unicode characters into Data Matrix using free C# demo code
  • Support customizing Data Matrix barcode image size, color, rotation, and data mode in Visual C#
  • Provide free Visual C# class code to get Data Matrix original Unicode string during decoding
  • Compatible with most high or low resolution printers & Data Matrix industrial specifications
C# Data Matrix Unicode Encoding Overview
Like QR Code barcode, Data Matrix is another two-dimensional barcode type that can encode Unicode data characters in C# class library. Invented in 1989, QR Code always be used to marking small items; labeling small electronic components. Moreover, Data Matrix is a part of a new traceability drive in many industries in the United States of America, particularly aerospace.
In the following section, we'll explain how to encode Unicode data strings into Data Matrix barcode. So, please firstly download our mature Data Matrix C#.NET Barcode Library DLL and test like below.
Data Matrix Unicode Encoding in C#.NET Class
Generally speaking, Data Matrix can only encode One Byte data characters. If you want to add and encode Unicode two bytes characters into Data Matrix, you can firstly use Base64 Conversion Method to change Unicode string into one byte data string and encode it to Data Matrix barcode.
On the contrary, for Data Matrix decoding, you still need to use Base64 Conversion Method to obtain your original Unicode data characters. Let's take Chinese characters as an example.

Use C# Code to Convert Data Matrix Unicode and Encode Base64 String

In English, the word refers to "barcode".

Use C# Code to Obtain Your Data Matrix Unicode Characters

After you get the decoded Base64 string, please use the C# sample code below to convert it back to your Chinese characters.
     byte[] base64SingleBytes = Convert.FromBase64String(data);
     string UnicodeFromBarcode = System.Text.Encoding.Unicode.GetString(base64SingleBytes);
Other C#.NET 2D Barcodes Unicode Encoding
You can also use C#.NET Barcode Generator Library to encode Unicode into other 2D barcode types, like QR Code and PDF 417.
If you want to know how to encode Unicode into Data Matrix with VB.NET class, please refer to:
Related Software Supports Barcode Unicode Encoding
If you want to generate and encode Unicode into 2d barcode images for ASP.NET, .NET Windows Forms, Reporting Services, Crystal Reports, RDLC Reports or Java applications. Please see:
Barcode for .NET - Other 1D & 2D Barcodes C# Encoding
1D Barcode Images:
2D Barcode Images: