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