Link Search Menu Expand Document

Set Unicode Value For Barcode - C#

BarCode SDK sample in C# demonstrating ‘Set Unicode Value For Barcode’

using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;
using System.Drawing;
using Bytescout.BarCode;

namespace Sample
    class Program
        static void Main(string[] args)
            // Create new barcode
            Barcode barcode = new Barcode("demo", "demo");

            // Set symbology
            barcode.Symbology = SymbologyType.QRCode;

            // set QR code encoding to UTF8 so will be able to encode Unicode 
            barcode.Options.Encoding = Encoding.UTF8;

            // Set Unicode barcode value string 日本
            barcode.Value = "日本";

            // show caption for 2d barcodes
            barcode.DrawCaptionFor2DBarcodes = true;

            // set caption font to Arial Unicode MS so it will display the caption
            barcode.CaptionFont = new Font("Arial Unicode MS", 8);

            // Save barcode to image

            // Show image in default image viewer

Download Source Code (.zip)

Return to the previous page Explore BarCode SDK