Forum Xamarin.Forms

Zxing Barcode Forward Slash Problem

csampaio01csampaio01 PTMember ✭✭✭

Hi, Im using the ZXing plugin to scan barcodes. But Im having a problem when scanning forward slashes.
Per example if the result is 2222/F1 it replaces with 2222&1.

I found these replacements:

/N -> \
/F -> &
/D -> $
/B -> "
/K -> +
/A -> !
/G -> '

Ive tried to use options to scan code 39 but it doesn't solve it.

Best Answer

Answers

  • AlessandroCaliaroAlessandroCaliaro ITMember ✭✭✭✭✭

    which kind of barcode are you reading?

  • csampaio01csampaio01 PTMember ✭✭✭
    edited March 2017

    Code 39.

    The code that I'm using is
    ` var options = new ZXing.Mobile.MobileBarcodeScanningOptions();
    options.PossibleFormats = new List<ZXing.BarcodeFormat>() {
    ZXing.BarcodeFormat.CODE_39
    };

            zxing = new ZXingScannerView
            {
                HorizontalOptions = LayoutOptions.FillAndExpand,
                VerticalOptions = LayoutOptions.FillAndExpand,
                AutomationId = "zxingScannerView",
                Options = options
            };
    
            zxing.OnScanResult += (result) =>
                Device.BeginInvokeOnMainThread(async () =>
                {
    
    
                     ....
    
    
                });
    
            overlay = new ZXingDefaultOverlay
            {
                TopText = "",
                BottomText = "",
                ShowFlashButton = zxing.HasTorch,
                AutomationId = "",
    
            };
            overlay.FlashButtonClicked += (sender, e) =>
            {
                zxing.IsTorchOn = !zxing.IsTorchOn;
            };
    

    `

Sign In or Register to comment.