This project has moved and is read-only. For the latest updates, please go here.

How to support Chinese Hanzi? (QRCode)

Jul 12, 2012 at 2:44 AM
Edited Jul 12, 2012 at 2:45 AM

How to support Chinese Hanzi?  (QRCode)


Jul 12, 2012 at 7:04 AM

Hanzi support is built-in. BUT I couldn't test it yet.

Please provide some more information. What doesn't work for you?

Please send me a sample barcode which doesn't decode correctly (and the expected result).

Jul 13, 2012 at 2:18 AM

Now,It can work correctly

 change source code (in file qrcode/encode/encoder.cs)

internal static String DEFAULT_BYTE_MODE_ENCODING = "ISO-8859-1";   


internal static String DEFAULT_BYTE_MODE_ENCODING = "utf-8";




Jul 13, 2012 at 7:44 AM

That isn't the correct way.

If you do so you would change the default character set for QR Code encoding. That is against the specifications.
Latin-1 / ISO-8859-1 is defined as the default character set for QR Codes.

If you want a different one you can use a hint while calling the encoder/decoder.

var hints = new Dictionary<EncodeHintType, object>();
hints.Add(EncodeHintType.CHARACTER_SET, "UTF-8");
Encoder.encode(content, ecLevel, hints);