Closed artfulsage closed 4 years ago
Hi, I could not reproduce it. My phone had read it correctly.
Yes! You are right! I have just tried another one scanner and it reads code correctly. Well in fact that's really sad because I don't know which one users will use. But anyway please excuse for troubling.
I couldn't reproduce it but found that where they come from. The qrcode encoder generates a pattern in UTF-8. But your scanner seems read it in not UTF-8 but CP1251.
System.out.println(new String("ST0011|пр. Первомайский".getBytes("UTF-8"), "CP1251") );
System.out.println(new String("ST00011|пр. Первомайский".getBytes("UTF-8"), "CP1251") );
ST0011|пр. Первомайский
ST00011|пр. Первомайский
Thanks for your investigation! I have found that for scanner prefix ST00011
means CP1251 and ST00012
means UTF-8. And so obviously ST0011
means nothing and scanner chooses encoding by itself. I did not know that. I very appreciate your help.
Hello. I have encountered a problem with incorrect code generation for some string.
Code for
ST0011|пр. Первомайский
is decoded correctly. And code forST00011|пр. Первомайский
is strangely decoded incorrectly toST00011|пр. Первомайский
.This is just the same as here https://github.com/soldair/node-qrcode/issues/235
It can be reproduced on demo page https://kazuhikoarase.github.io/qrcode-generator/js/demo/ with default params.