detect encoding + barcode