简体   繁体   English

扫描条码 Swift 中的 Unicode 字符

[英]Unicode characters in scanned Barcode Swift

I have created one bar code scanner application and used AVFoundation native framework.我创建了一个条形码扫描仪应用程序并使用了 AVFoundation 原生框架。 Some of our barcode contains hidden unicode characters and we are unable to scan it.我们的某些条码包含隐藏的 unicode 字符,我们无法对其进行扫描。 Here is an example of bar code: ]d201000000000010!0000-023 I am getting above code like: \\u{1D}01000000000010\\u{1D}0000-023这是一个条形码示例: ]d201000000000010!0000-023 我得到上面的代码,如:\\u{1D}01000000000010\\u{1D}0000-023

In above barcode ]d2 varies.在上面的条形码]d2 变化。 I am unable to find type of the barcode.我无法找到条形码的类型。 How can I parse that Unicode contained string into normal string?如何将包含 Unicode 的字符串解析为普通字符串? Does any one face this type of issue or barcode?有没有人面临这种​​类型的问题或条形码? Thanks in advance.提前致谢。

\\u{1D}01000000000010\\u{1D}0000-023 Looks to be a GS1-formatted barcode. \\u{1D}01000000000010\\u{1D}0000-023看起来是 GS1 格式的条码。 Full spec is here And the values after the {1D} delimiter are call "application identifiers" and identify the type of data contained in that field.完整规范在这里{1D}分隔符之后的值称为“应用程序标识符”并标识该字段中包含的数据类型。 GS1 is really common in any industry where full supply-chain tracking is needed such as the medical device industry, etc. A concise list of application identifiers is here GS1 在任何需要完整供应链跟踪的行业中都很常见,例如医疗器械行业等。应用标识符的简明列表在这里

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM