kazuhikoarase / qrcode-generator

QR Code Generator implementation in JavaScript, Java and more.
https://kazuhikoarase.github.io/qrcode-generator/js/demo/
MIT License
2.12k stars 680 forks source link

Fix for issue #3 added conversion from UTF-16 string to UTF-8 array. #7

Closed elhigu closed 9 years ago

elhigu commented 9 years ago

Hi, we came across Issue #3 which has been reported some time ago. Here is fix where javascript internal UTF-16 string format is converted to UTF-8 which is usually used in QR codes (e.g. android, ios etc. readers).

kazuhikoarase commented 9 years ago

Hi,

It is not a bug. qrcode.js itself supports ISO-8859-1 (a.k.a. US-ASCII). You can overwrite qrcode.stringToBytes like qrcode_SJIS.js. ( In my country, multi-byte characters are often encoded in SJIS. ) https://github.com/kazuhikoarase/qrcode-generator/blob/master/js/qrcode_SJIS.js

Thank you.

elhigu commented 9 years ago

Thank you for feedback. Would you like to include to your repository file js/qrcode_UTF8.js if I write one and submit pull request for that?

kazuhikoarase commented 9 years ago

Yes, of course. :)