0

I have been using ZXing .Net for scan DataMatrix (standard GS1) with Xamarin with following options. But still not getting ASCII value (FNC1).

private async void scanButton_Clicked(object sender, EventArgs e)
    {

        var options = new ZXing.Mobile.MobileBarcodeScanningOptions
        {
            PossibleFormats = new List<ZXing.BarcodeFormat>() {                   
                ZXing.BarcodeFormat.DATA_MATRIX
            }
        };
        options.AssumeGS1 = true;
        //Scanning part
        var barcode  = "";
        scanPage = new ZXingScannerPage(options);

        scanPage.OnScanResult += (result) =>
        {
            scanPage.IsScanning = false;

            Device.BeginInvokeOnMainThread(() =>
            {
                Navigation.PopAsync();
                barcode = result.Text;
            });
        };

        await Navigation.PushAsync(scanPage);
    }

Why i can't see ASCII value (FNC1) ?

Thanks

dush88c
  • 1,918
  • 1
  • 27
  • 34
  • Do you show your "scanPage"? I expected to see Navigation.PushAsync(scanPage) somewhere in your code...Can you reach the code in your last lines in the debugger? If yes, what do you get in result.Text? – Grisha Aug 06 '18 at 14:12
  • @Grisha , Yes I can reach to the last line. and if I copy return value in NotePad++ , I can see FNC character "GS" But how can I make it visible? – dush88c Aug 07 '18 at 06:29
  • When I copy this value (result.Text) into notepad++ , I could see hidden ASCII character. Then I copied that one and use as a variable to replace with any symbol using String Replace method. – dush88c Aug 07 '18 at 09:04
  • I'm sorry, but I don't understand your problem. FNC1 is invisible character by definition, you can't *see* it. In any case, it has nothing to do with zxing barcode scanner and/or xamarin - they read the value right as far as I understand. – Grisha Aug 07 '18 at 11:06
  • @Grisha, Thanks for your support. Actually, it was coming but not visible. I saw only when copying the value in Notepad++. – dush88c Aug 07 '18 at 11:11

0 Answers0