fix error when validating non-ascii barcodes