Reputation: 3
I'm using the following example application for barcode scanning: https://github.com/xamarin/ios-samples/tree/main/ios11/AVCamBarcode
It scans all the barcode types perfectly, but when it comes to Code 39 type barcodes I get strange results.
Example 1: when I scan the following barcode (https://barcode.tec-it.com/en/Code39FullASCII?data=Aa-1234) I expect Aa-1234 as a result but I get A+A-1234 instead.
Example 2: Scanning this (https://barcode.tec-it.com/en/Code39FullASCII?data=Aa-1234%2B) I expect Aa-1234+ as a result but I get A+A-1234/K
Example 3: Scanning this (https://barcode.tec-it.com/en/Code39FullASCII?data=A%2F1234) I expect A/1234 as a result but I get A/O1234.
In the first example you can see that instead of a lowercase letter it shows + symbol and the letter in capital. Symbol / is replaced with /O and + is replaced with /K.
Why do I get these results and how can I resolve it? Is it some kind of encoding that I need to handle after I get a result with Code 39 type barcodes?
I thought that it's some encoding issue but I didn't find any helping information related to it. If anybody has any helping idea I would appreciate it.
Upvotes: 0
Views: 398
Reputation: 1776
The original Code39 specification was uppercase only. The Code39 Full ASCII is an entirely different specification utilizing character pairs (+A for lowercase 'a', for example). It may be that the AVCamBarcode app requires configuration to support Code 39 FA. It may not support it at all. It seems that the repo relies on iOS to do the heavy lifting and the symbology support is up to the operating system.
My recommendation is to use Code 39 legacy format and accept only uppercase characters or switch to Code 128B. It depends on what you are using to print the barcodes and if that is within the scope of your project.
Upvotes: 0