GithubHelp home page GithubHelp logo

Comments (6)

heuer avatar heuer commented on August 27, 2024

Thanks for your report.

Can you provide an example (or a test case)?
Are you using the API or the command line script?
Which decoder do you use?

Thanks.

from segno.

zhangqm666 avatar zhangqm666 commented on August 27, 2024

Thank you for your reply!

This is my code:
import sys
import segno
qr = segno.make('0H450116721300010000001-010010000000000011842118', version=7, error='H')
qr.save('H.png', scale=5)

And I decode H.png by https://www.onlinebarcodereader.com/, the following image is the result.
qr
The correct result should be:
qr2

from segno.

heuer avatar heuer commented on August 27, 2024

Thanks for your explanation. As I see it, the output (see "content" box) is correct (your screenshot does not show the complete box).

result

IMO it's a problem of the webservice and not a Segno issue. You can try QR codes generated by other libs (I used PyQRCode and libqrencode) and you'll always get the same result.

from segno.

zhangqm666 avatar zhangqm666 commented on August 27, 2024

Yes. It looks right, but in fact sengo append a "\n" to the content. We can find a '0a' in the end of the hex values and it's a "\n" ( hex(ord('\n')) = 0xa ).

from segno.

heuer avatar heuer commented on August 27, 2024

but in fact sengo append a "\n" to the content.

I guess the webservice adds it while decoding or presenting the hex code.

As written, the webservice always adds 0a regardless which QR code lib I tried.
Please try another QR code lib and you'll see that it adds the 0a to the result.

Here the result of another decoder (ZXing):

zxingres

from segno.

zhangqm666 avatar zhangqm666 commented on August 27, 2024

OK. I'll try it. Thank you very much.

from segno.

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.