Why does script for offline QR Code doesn't work for emoji symbols?

Publish date: 2024-06-26

My requirement is to generate QR code for below 2 texts in javascript/jQuery

Condition is that I can't use any URL feed to generate QR code online like below Google QR example
https://chart.googleapis.com/chart?cht=qr&chs=200x200&chl=ThisIsSomeText
If I use above, QR code for both texts are generated successfully(checked after scanning)

I only have to use any QR code plugin within my code to generate QR code offline(no network connectivity restriction)
So, I tried below jQuery plugins that would work offline

Plugin 1: https://www.studytonight.com/post/javascript-qr-code-generator
Plugin 2(qrenc3.html): https://code.google.com/archive/p/jsqrencode/downloads

If I use any of above 2 plugins, the QR code is properly generated for Text 1 only, not Text 2.
If text has emojis, it creates improper QR code. Check below generated QR codes.

For Text 1: (Plain text)below is code generated(proper text comes after scanning)
enter image description here

For Text 2: (Emojis)below is code generated(Unknown encoding or not scannable)
enter image description here

I need help if anyone can solve above or share any jQuery plugin (offline) that would generate QR code for emojis.

[I have not added any code as plugins already have demo in them. Hope that's fine]
Thanx in advance for help.

3 Related questions 68 How to remove emoji code using javascript? 84 How to detect emoji using javascript 26 Printing emojis with JavaScript and HTML Related questions 68 How to remove emoji code using javascript? 84 How to detect emoji using javascript 26 Printing emojis with JavaScript and HTML 2 Display unicode characters (emojies) in Javascript 2 Emojis not displaying in textarea 2 Emoticons doesn't work with multiple emoji in (Saferi and Chrome browser) 0 Display emoji in a div using Emoji One Area 0 How to get some of the codepoint emoji values to work 1 Some emojis don't match my Emoji-only regex 4 How get real char code from an emoji in JavaScript? Load 7 more related questions Show fewer related questions

Sorted by: Reset to default

ncG1vNJzZmirpJawrLvVnqmfpJ%2Bse6S7zGiorp2jqbawutJobW5qZWiFd4OOsJ%2ByZZSksrR50pypoqikYrOwvoyonZ%2BkmaOybr3RZpqonJVisbCx0qerZq%2Bfp7huss6rZJ6ln5%2B2br%2FYppmopKM%3D