-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with utf-8 #7
Comments
Hmm... the raw bytes of the QR code are decoded by the browser's TextDecoder according to the selected character encoding, so there is not much that I can do about false decoding. On the other hand, are you sure that the QR code is UTF-8 encoded? I googled and found several Vietnamese character encodings. |
The image is confidential, so it should be removed |
Let me explain in more detail: If the text is not what is expected then I see two possible reasons:
|
I copied your expected text, pasted in into an online QR generator and obtained this QR code: Scanning this QR code yields the following (correct) result: This indicates that the text in your QR code is most likely not UTF-8-encoded. |
The image is confidential, so it should be removed |
Hmmm... the Please give me some time to look into that. |
I really hope you get this fixed soon. Since I am developing a library for Angular |
@id1945 Your original qr code can be read correctly by configuring import { ZBarConfigType, ZBarImage, ZBarScanner, ZBarSymbolType } ...;
const scanner = await ZBarScanner.create();
scanner.setConfig(ZBarSymbolType.ZBAR_NONE, ZBarConfigType.ZBAR_CFG_BINARY, 1); // <-- important
scanner.scan(image);
const symbols = scanner.getResults(); However, in order to read the code that I generated correctly, the Thus, with a particular setup, either one or the other QR code can be read correctly but not both. This appears to be one of the peculiarities of the ZBar bar code reader on which |
@undecaf Thank you very much. I've also tried and it doesn't work at all. It is still a headache for me. |
@undecaf jschardet (https://www.npmjs.com/package/jschardet) may help:
|
Thanks @pascalschoeni ! @id1945 : |
@undecaf 🥇 |
@undecaf 🥇 🥇 |
The image is confidential, so it should be removed
The text was updated successfully, but these errors were encountered: