Git Product home page Git Product logo

Comments (4)

tilkinsc avatar tilkinsc commented on August 24, 2024

A \n is appended to what exactly? That was really unclear.

from qrcoder.

Juliuss11 avatar Juliuss11 commented on August 24, 2024

QRCodeData qrCodeData = qrGenerator.CreateQrCode(inputString, QRCodeGenerator.ECCLevel.Q);

At the end of the inputString a \n is appended. The easiest mode to see it is use an empty string.
inputString = ""
The program in this case should not be able to create a QRcode, since there is nothing to convert.

In the same way, whatever is the inputString, the last character of the QRcode is a \n

from qrcoder.

codebude avatar codebude commented on August 24, 2024

Are you sure, that this linebreak isn't added by your scanner app? (By the way which app/code do you use to decode the QR code?)

I generated a QR code with your code above and stepped through the source of QrCoder. I can't find any code line, where a linebreak would be added.

After that I checked the QR code with Henrik Kaare Poulsen's QR code debugger. That's the result:

left=80 right=499 top=80 bottom=499
size=420
matchVersion version=1 finder0=64 finder1=64 finder2=64
matchVersion version=1 timing0=1 timing1=1 alignment=1
matchVersion version=1 format_NW =24 0 format_NESW =24 0 format = 24 ecl = 3 mask = 0
matchVersion version=1 grades(F(V)TAF): 4444->4
findModuleSize version=1 grade=4 error_correction_level=3 mask=0
getCodewords mask=0 length=26
getCodewords = 16,0,0,236,17,236,17,236,17,236,17,236,17,30,193,101,250,78,211,164,186,198,156,226,144,6
setBlocks n_blocks_first=1 n_blocks_second=0 n_blocks=1 n_block_words_first=13 n_block_words_second=0 n_block_ec_words=13 total=26
setBlocks block 0 (26): 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25
RS calculateSyndroms: No errors
correctErrors in = 16,0,0,236,17,236,17,236,17,236,17,236,17,30,193,101,250,78,211,164,186,198,156,226,144,6
correctErrors out = 16,0,0,236,17,236,17,236,17,236,17,236,17
error_grade=4
extractData bytes in (13) = 16,0,0,236,17,236,17,236,17,236,17,236,17
extractData mode = 1
extractNumeric charcount = 0
extractData mode = 0
extractData data(0) =

As you can see the payload contains 0 chars (extractNumeric charcount = 0). It says numeric char count, because QR coder chooses the mode with the highest enconding possible. Since there are no input chars the Numeric mode is valid and since it has the best compression, it was used.

Also the output (extractData data(0) =) is empty. So I think the new line is added by your code or the QR code reader you used for reading the code.

from qrcoder.

codebude avatar codebude commented on August 24, 2024

Hi @Juliuss11 - can you re-check this? Or can anybody else proof or disprove my comment above? Otherwise I would like to close this issue in the next couple of days.

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.