Spire.Barcode is a professional barcode library specially designed for .NET developers (C#, VB.NET, ASP.NET, .NET Core) and Java developers (J2SE and J2EE) to generate, read and scan 1D & 2D barcodes.

Sun Nov 21, 2021 6:28 am

Dears,

How can I use the QR Code generator to include some Unicode chars (Arabic language), when I did that, it comes corrupted in the scan.

Regards,

AhmedGKA
 
Posts: 4
Joined: Sun Nov 21, 2021 6:27 am

Mon Nov 22, 2021 3:52 am

Hello,

Thanks for your inquiry!

Please refer to the following code to generate a QRCode with Arabic through our Spire.Barcode. Here I also attached my result QRCode image.

Code: Select all
            BarcodeSettings settings = new BarcodeSettings();
            settings.Type = BarCodeType.QRCode;

            //data of qrcode
            settings.Data = "اختبار اللغة العربية.";

            //show text on the top
            settings.Data2D = "اختبار اللغة العربية.";


            settings.QRCodeDataMode = QRCodeDataMode.Auto;
            settings.QRCodeECL = QRCodeECL.H;
            settings.X = 2.0f;


            BarCodeGenerator generator = new BarCodeGenerator(settings);
            Image image = generator.GenerateImage();
            image.Save("QRCode.png");
            System.Diagnostics.Process.Start("QRCode.png");

QRCode.png

If you encounter any issues related to our product in the future, just feel free to contact us.

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Tue Nov 23, 2021 12:46 am

Thank you for your fast support,

I tested the code, even if the 2D text is Arabic encoded correctly, but when I scan the QR using the mobile, it gives wrong text.

images below

Thank you.

AhmedGKA
 
Posts: 4
Joined: Sun Nov 21, 2021 6:27 am

Tue Nov 23, 2021 12:50 am

by the way, the generated image attached by your code in your post is readable without issue, what is wrong with my image :(

AhmedGKA
 
Posts: 4
Joined: Sun Nov 21, 2021 6:27 am

Tue Nov 23, 2021 1:52 am

Hello,

Thanks for your feedback!

First, which version of Spire.Barcode are you using? If you are not using our latest Spire.Barcode for net version 5.9.4, I recommend that you can try it.

If you are using it already, please provide us with your testing code and generated image for further investigation.

Thanks in advance.

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Tue Nov 23, 2021 11:26 pm

Yes, it works perfect when I upgraded to the newest version, I were using 4.xx.

Thank you,

AhmedGKA
 
Posts: 4
Joined: Sun Nov 21, 2021 6:27 am

Wed Nov 24, 2021 1:15 am

Hello,

Thanks for your feedback!

Glad to hear that the latest version has resolved your issue. If you encounter any issues related to our product in the future, just feel free to contact us.

Have a nice day!

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Return to Spire.BarCode