aschuch / QRCode

A QRCode generator written in Swift.
MIT License
738 stars 198 forks source link

Update QRCode.swift #30

Closed hongseok closed 8 years ago

hongseok commented 8 years ago

Fixed Crash when non latin string. (ex. include CJK characters)

aschuch commented 8 years ago

Apple's documentation explicitly states to use NSISOLatin1StringEncoding encoding.

Generates an output image representing the input data according to the ISO/IEC 18004:2006 standard. The width and height of each module (square dot) of the code in the output image is one point. To create a QR code from a string or URL, convert it to an NSData object using the NSISOLatin1StringEncoding string encoding.