Dynamsoft / capture-vision-xamarin-forms-samples

Other
3 stars 1 forks source link

QR code Reader Convert Value #36

Closed NengStyleCnb closed 2 years ago

NengStyleCnb commented 2 years ago

Hello sir, We have testing on qr reader have some problem that we got below, we are your client at Canadia Bank please help to resolve this problem. Thanks you.

reader text: xxxxxxxxxxxxxxxxxxxxxxxx53038405802KH5920KOI ThÈ VC Lifestylexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx original text: xxxxxxxxxxxxxxxxxxxxxxxx53038405802KH5920KOI Thé VC Lifestylexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

the wrong value is : ### ThÈ ###

QR code:

IMAGE 2022-08-05 10:42:41

Dynamsoft-Jerson commented 2 years ago

Hi,

For Xamarin.Android:

// suppose result is an instance of TextResult byte[] barcodeBytes = new byte[result.BarcodeBytes.Count]; result.BarcodeBytes.CopyTo(barcodeBytes, 0);

Encoding iso88591 = Encoding.GetEncoding("ISO-8859-1"); string newBarcodeText = iso88591.GetString(barcodeBytes);

For Xamarin.iOS:

// suppose result is an instance of iTextResult string newBarcodeText = result.BarcodeBytes.ToString(Foundation.NSStringEncoding.ISOLatin1);

Dynamsoft-Jerson commented 2 years ago

@NengStyleCnb Have you tried it? Is it OK now?

NengStyleCnb commented 2 years ago

@Dynamsoft-Jerson Yeah, now it ok thanks you.