Barcode error with "è"


#1

Hello,

I use Aspose.BarCode .Net version 18.6.0, and I try to generate a DataMatrix barcode.
I have these results :

What I write -> What I see in barcode.

  • Kévin -> Kévin [OK]
  • Kèvin -> K vin [KO]
  • Kévèn -> Kévèn [OK]

When “è” is alone, it is not correctly converted in the barcode.
When there is another special character, it is OK.

Here is my configuration :

EncodeType=“DataMatrix”
Columns=“0”
Rows=“0”
xDimension=“3”
yDimension=“3”
BarHeight=“7.8”
BorderWidth=“0”
CodeLocation=“None”
ImageHeight=“10.15625”
ImageWidth=“310”
MarginsLeft=“4”
MarginsRight=“4”
GraphicsUnit=“Display”

Thank you very much for your help !


#2

@KevinCarnal2m,

Thanks for your details.

Please try our latest version/fix: Aspose.BarCode for .NET v19.5.

I have tested using the simplest lines of code with v19.5 and I do not find any issue with the output image for code text:
e.g
Sample code:

using (Aspose.BarCode.Generation.BarCodeGenerator generator = new Aspose.BarCode.Generation.BarCodeGenerator(Aspose.BarCode.Generation.EncodeTypes.DataMatrix, "Kèvin"))
            {
                generator.AutoSizeMode = Aspose.BarCode.Generation.AutoSizeMode.Nearest;
                generator.BarCodeWidth.Millimeters = 30;
                generator.Save("e:\\test2\\out1.png", BarCodeImageFormat.Png);


            }  

If you still find the issue with v19.5, kindly do share your sample code (runnable) and post your output image file, we will check it soon.
out1.png (403 Bytes)


#3

Thanks for your message.

I tried your sample code with the version v19.5.
Here is my result : out1.png (403 Bytes)

It is always wrong. If you check this image with a barcode scanner, you’ll see that “è” is not correct.


#4

@KevinCarnal2m,

I used the following sample code using the output image to read the barcode:
e.g
Sample code:

var bmp = new Bitmap("e:\\test2\\out1.png");
            Aspose.BarCode.BarCodeRecognition.BarCodeReader reader = new Aspose.BarCode.BarCodeRecognition.BarCodeReader(bmp, Aspose.BarCode.BarCodeRecognition.DecodeType.DataMatrix);

            if (reader.Read())
            {
                Console.WriteLine(reader.GetCodeText());
            }

output:
K<FNC1>vin

Do you see the same results? After your confirmation, I will log a ticket for it.


#5

Yes, I have the same results


#6

@KevinCarnal2m,

Thanks for the confirmation.

We were able to reproduce the issue as you mentioned using latest version of Aspose.BarCode for .NET v19.5.
e.g
Sample code:

        //Barcode error with “è” 
        using (Aspose.BarCode.Generation.BarCodeGenerator generator = new Aspose.BarCode.Generation.BarCodeGenerator(Aspose.BarCode.Generation.EncodeTypes.DataMatrix, "Kèvin"))// it works when using "Kévin" or "Kévèn"
        {
        generator.AutoSizeMode = Aspose.BarCode.Generation.AutoSizeMode.Nearest;
        generator.BarCodeWidth.Millimeters = 30;
        generator.Save("e:\test2\out1.png", BarCodeImageFormat.Png);

        } 

    //Reading barcodes. 
var bmp = new Bitmap("e:\\test2\\out1.png"); 
Aspose.BarCode.BarCodeRecognition.BarCodeReader reader = new Aspose.BarCode.BarCodeRecognition.BarCodeReader(bmp, Aspose.BarCode.BarCodeRecognition.DecodeType.DataMatrix); if (reader.Read()) { Console.WriteLine(reader.GetCodeText()); 
    }

output:

K<FNC1>vin

I have logged a ticket with an id “BARCODENET-37218” for your issue. We will look into it soon.

Once we have an update on it, we will let you know.