Barcode error with "è"

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 !

@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)

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.

@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.

Yes, I have the same results

@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.

@KevinCarnal2m,

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

It will work with one extra setting: generator.Parameters.Barcode.DataMatrix.DataMatrixEncodeMode = DataMatrixEncodeMode.Full;

See the sample code segment that works fine as we tested:
e.g
Sample code:

foreach (var text in new string[]
            {
            "Kévin",
            "Kèvin",
            "è",
            "Kévèn",
            "K1vèn",
            "1111è",
            "111è1",
            "11è11",
            "1è111",
            "è1111",
            "èèèèè"
            })
            {
                using (var generator = new Aspose.BarCode.Generation.BarcodeGenerator(Aspose.BarCode.Generation.EncodeTypes.DataMatrix, text))
                {
                    generator.Parameters.Barcode.DataMatrix.DataMatrixEncodeMode = DataMatrixEncodeMode.Full;
                    using (var reader = new Aspose.BarCode.BarCodeRecognition.BarCodeReader(generator.GenerateBarCodeImage(), Aspose.BarCode.BarCodeRecognition.DecodeType.DataMatrix))
                    {
                        reader.Read();
                        if (text != reader.GetCodeText())
                        {
                            throw new ApplicationException();
                        }
                    }
                }
            }

Let us know your feedback.

Yes, it works perfectly with this parameter !
Thank you very much !

@KevinCarnal2m,

Good to know that your issue is sorted out with the suggested sample code. Feel free to contact us any time if you need further help or have some other issue or queries, we will be happy to assist you soon.