Hi, it looks like UPC-A addons are missed by decoder when EAN-13 reader's results are converted to UPCA. The code in MultiFormatUPCEANReader.cpp should look like this:
if (ean13MayBeUPCA && canReturnUPCA)
{
// Transfer the metdata across
QSharedPointer<Result> resultUPCA(new Result(result->getText()->substring(1),
result->getRawBytes(),
result->getResultPoints(),
BarcodeFormat::UPC_A,
{}, // default charset
result->getMetadata())); // metadata with addon details
// needs java metadata stuff
return resultUPCA;
}
See the two extra parameters after the BarcodeFormat::UPC_A.
Maybe something like this would also work, so we don't have to touch the charset parameter in the ctor, but I haven't tried it:
Hi, it looks like UPC-A addons are missed by decoder when EAN-13 reader's results are converted to UPCA. The code in
MultiFormatUPCEANReader.cpp
should look like this:See the two extra parameters after the
BarcodeFormat::UPC_A
.Maybe something like this would also work, so we don't have to touch the charset parameter in the ctor, but I haven't tried it: