2

I'm trying to scan a QR-Code containing a null byte (\x00) with AVFoundation.

The problem is that AVMetaDataMachineReadableCodeObject.stringValue only returns the data before the null byte.

For example when QR-Code data is "ABC\x00abc" the stringValue only returns "ABC"

Is there a way to get the complete String?

I already found this question: Read binary QR Code with AVFoundation but I'm not sure if the "BarcodeRawData" is what I need or how to convert this Data to a String.

Community
  • 1
  • 1
ndreisg
  • 1,119
  • 13
  • 33
  • We encountered the same issue while reading DataMatrix with Objective C. The issue is probably related to the null (`/x00`) character that is also used in C to identify the end of a C string. – Matteo Mazzarolo Nov 23 '17 at 15:30

0 Answers0