WICG / shape-detection-api

Detection of shapes (faces, QR codes) in images
https://wicg.github.io/shape-detection-api
Other
301 stars 35 forks source link

DetectedBarcode.rawValue could be binary data. #35

Open yellowdoge opened 7 years ago

yellowdoge commented 7 years ago

DetectedBarcode.rawValue is defined as a DOMString, whereas depending on the barcode itself, it could be binary. Adapt the Spec to reflect that.

reillyeon commented 5 years ago

I've investigated the question of whether or not QR codes can contain binary data and found that it is not the case. The "binary mode" seems to default to the ISO-8859-1 but can be overridden to other character sets using ECI hints.

Importantly, in our implementation experience within Chromium we found that the barcode detection APIs on Android and macOS return the decoded value as their native string types which are defined as containing UTF-16 codepoints.

reillyeon commented 4 years ago

I have repeated this analysis in investigating Chromium issue 1023177 and determine that this data in available from platform barcode scanning APIs.