ushelp / EasyQRCodeJS

EasyQRCodeJS is a flexible QR code generator using JavaScript, supporting various drawing methods (Canvas, SVG, Table) and customization options. It's compatible with major frameworks and can be directly downloaded in the browser.
https://www.easyproject.cn/easyqrcodejs/home.html
MIT License
734 stars 156 forks source link

Not recognized MeCard QR Code generated from non-ASCII characters as UTF-8 with BOM #67

Closed omegastripes closed 2 years ago

omegastripes commented 2 years ago

BOM character EF BB BF added at the beginning prevents a scanning application from recognizing QR Code as MeCard. Recognized as plain text (no "Add contact" button appears). Need an option to control whether to add BOM character or not.

The simplest string for testing purposes might be MECARD:N:Á;.

Tested on QR Droid Private.

ushelp commented 2 years ago

@omegastripes Thanks for your feedback. Now we use UFT-8 without BOM as the default setting. You can upgrade to the latest version 4.4.1, no code need to change from your side.

And we provide the utf8WithoutBOM option to set whether to use BOM.

  // =====  UTF-8 without BOM
  /*
  utf8WithoutBOM: true
  */