Git Product home page Git Product logo

Comments (8)

codebude avatar codebude commented on August 24, 2024

Hi @Bratmaxe1981 ,

if it's ok for you, I'll switch over to english, because other users get the chance to take part on the discussion. If that's not ok for you, let me know, then I'll switch back to german.

At first, what are you trying to do by Encoding your string to Utf-8 and back to ISO-8859-1? Normally you don't have to do that, because the QrCoder has an automatic check for Encoding. If possible it will decode in ISO-8859-1 otherwise in UTF-8...

The "PixelPerModule"-value doesn't really has an impact on the decoding. It only says how big the blocks should be drawn, but it doesn't change how data is encoded. This value could only be to small for your camera, so that it can't recognize the blicks, but 5 px should be big enough for most readers/cameras, but for test cases your could try to raise this value up to 25 (px per block).

Now let's come to your problem. I tried what you said and can see your problems partly.
When I encode your text with encoding level m everything works fine with every reader I tested.

When I encode it with encoding level L, I get problems, but only with some readers.

So it's hard to say if the error is in QrCoder library or maybe in the decoder engines of the other QrCode readers...

from qrcoder.

Bratmaxe1981 avatar Bratmaxe1981 commented on August 24, 2024

Hi codebude,
ok I'll try it in english.
I think it is a bug in the QrCoder because if I change the Qualitylevel I can read it with every reader.
I have always expected to get the same result with the same text input, even if I change the Quality Level.

Please try this one. I can't read it with the Android App above:
http://www.bilder-upload.eu/upload/cc4dd8-1491481977.png
Sometimes the App read the QR-Code, but the result is only a number (192586) not the text.

I'm not really sure what I tried with the encode to UTF-8 and back to Iso.
I think I want to convert unwanted Characters (for example an – to an -) in one step.
It looks like the same but the first one in a automated generated from Winword. (it's slightly longer)

Thanks and greetings from Willich

from qrcoder.

codebude avatar codebude commented on August 24, 2024

Hi @Bratmaxe1981 ,

ok, the code you linked to in your last post seems to be defective. I can't decode it with any of my decoders. Could you please post:

  • the value/text you have encoded
  • the ECC Level you have used
  • any other parameters you have set

The I'll try to find some time to start a debugging session, because right now I have no idea what's going wrong.

Kind regards and greetings from Meerbusch ;-)

from qrcoder.

Bratmaxe1981 avatar Bratmaxe1981 commented on August 24, 2024

Hi,

this is the Text I tried to encode:
[#P-BOF#]\nXX\nXXX\nXXXXXXXXX\nTest-Text\nXXXXXXXXXXXXX\n$XX=255.255.0.0\n$XX=10.10.0.254\n$XX=\n$XX1=16\n$XX2=16\n$XX3=16\n$XX4=16\n$YY1=ON\n$YY2=OFF\n$YY3=ON\n$YY4=OFF\n$ZZ1=16\n$ZZ2=16\n$ZZ3=16\n$ZZ4=16\n$AA1=B\n$AA2=B\n$AA3=B\n$AA4=B\n$VID1=1\n$VID2=1\n$VID3=1\n$VID4=1\n$VID5=1\n[#EOF#]

ECCLevel is L

QRCodeGenerator qrGenerator = new QRCodeGenerator();
QRCodeData qrCodeData = qrGenerator.CreateQrCode(iso.GetString(utf8.GetBytes(Text)), QRCodeGenerator.ECCLevel.L);
QRCode qrCode = new QRCode(qrCodeData);
Bitmap qrCodeImage = qrCode.GetGraphic(5);

But I also found a bug in my function, but it shouldn't have to do anything with this bug.
(I have programmed a function that should delete all spaces in the text, but in this function I also delete all "/r" in the text (after each value). Is there a character limit per line witch I exceeded?

Thanks for your help

from qrcoder.

codebude avatar codebude commented on August 24, 2024

I tried again. When I run the code you posted above, with your value, I get a QrCode which works without problems. But after having a closer look to the QR code image, it looks in most points similiar, but with slightly differences. So I'm confused. Why do I get another Qr Code image (compared to the one you posted above) than you, while running the same code...

from qrcoder.

tilkinsc avatar tilkinsc commented on August 24, 2024

Could it be when he reads this data in, the /n are omitted?

from qrcoder.

codebude avatar codebude commented on August 24, 2024

@Hydroque when "who" reads? QrCoder when parsing the payload or the respective QrCode reader apps? For QrCoder I can say that the \n will be read and parsed. I checked that by debugging as also by scanning the generated code in ECC level L. (Like I said, some readers can read the code and the QrCode debugger doesn't give any errors.)

from qrcoder.

tilkinsc avatar tilkinsc commented on August 24, 2024

For example, reading the data separated by \r\n, "read by line" when concatenating that string above, it could omit these. With lack of a MWE, we can't really find the bug if you are doing it correctly and getting correct results.

from qrcoder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.