From b6e047325283d7d6a4b7205fac4f631ee31f0517 Mon Sep 17 00:00:00 2001 From: Marc Date: Thu, 19 Mar 2026 14:53:04 +0100 Subject: [PATCH] Enhance barcode format checking in isFormat06Code Updated isFormat06Code method to handle additional barcode formats for compatibility with older Mouser parts and Eyoyo barcode scanners that don't omit the record separator character --- .../BarcodeScanner/EIGP114BarcodeScanResult.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/Services/LabelSystem/BarcodeScanner/EIGP114BarcodeScanResult.php b/src/Services/LabelSystem/BarcodeScanner/EIGP114BarcodeScanResult.php index 38b20562f..0ff74fd48 100644 --- a/src/Services/LabelSystem/BarcodeScanner/EIGP114BarcodeScanResult.php +++ b/src/Services/LabelSystem/BarcodeScanner/EIGP114BarcodeScanResult.php @@ -254,12 +254,16 @@ public function guessBarcodeVendor(): ?string */ public static function isFormat06Code(string $input): bool { - //Code must begin with [)>06 - if(!str_starts_with($input, "[)>\u{1E}06\u{1D}")){ - return false; + //Code should begin with [)>06 as per the standard + if(!str_starts_with($input, "[)>\u{1E}06\u{1D}") + // some codes don't contain record separators + && !str_starts_with($input, "[)>06\u{1D}") + // This is found on old Mouser parts + && !str_starts_with($input, ">[)>06\u{1D}")) + { + return false; } - - //Digikey does not put a trailer onto the barcode, so we just check for the header + //Digikey and Mouser don't put a trailer onto the barcode, so we just check for the header return true; }