yeahdongcn / RSBarcodes_Swift

1D and 2D barcodes reader and generators for iOS 8 with delightful controls. Now Swift.
MIT License
707 stars 185 forks source link

Codes is showing invalid #117

Open ghost opened 6 years ago

ghost commented 6 years ago

I tried generate a bunch of different barcodes with different format and strings, and i cross check the code and type with the following website. I encountered some issues:

Code39 WIKIPEDID https://barcode.tec-it.com/en/Code39?data=*WIKIPEDID*

let isValid = RSUnifiedCodeValidator.shared.isValid("WIKIPEDID", machineReadableCodeObjectType: AVMetadataObject.ObjectType.code39.rawValue) returned false. Is it because of the asterisk sign? Is there anyway to include the sign as part of the code?

EAN13 123456789015 https://barcode.tec-it.com/en/EAN13?data=123456789015

For this code, isValid return false.

Also, is it possible to display wording under the code like so: ? download

yeahdongcn commented 6 years ago

Code39 *WIKIPEDID* - Yes, the initiator and terminator of code39 is the asterisk (*). You can also see https://barcode.tec-it.com/en/Code39?data=*WIKIPEDID , the generated barcode trims the asterisk `().`

EAN13 123456789015 - The length of contents is 12 (EAN13 - needs to be 13)

Is it possible to display wording under the code like so - Yes, you can simply add a label under the image view.

huangmaoyixxx commented 5 years ago

have same issue, EAN13 just have 12 length, put InputCorrectionLevel.Low, but still not work