libcimbar icon indicating copy to clipboard operation
libcimbar copied to clipboard

I have successfully compiled the project on Windows. When decoding, a single QR code image parses without issues, but when there are multiple QR codes, the decoded files open as garbled text. What could be causing this? Thank you.

Open fighter-01 opened this issue 9 months ago • 7 comments

fighter-01 avatar Mar 21 '25 01:03 fighter-01

What does the full command look like when you try the encoding/decoding?

sz3 avatar Mar 21 '25 05:03 sz3

This is the encode command: ./cimbar --encode -i inputfile.txt -o outputprefix This is the decode command: ./cimbar outputprefix*.png -o ./

fighter-01 avatar Mar 21 '25 05:03 fighter-01

fighter-01 avatar Mar 21 '25 05:03 fighter-01

Under Windows, I made the following modifications to the cimbar class. After the changes, it can generate files, but the generated files contain garbled text: cpp

vector infiles; if (result.count("in")) { for (const auto& pattern : result["in"].as<vector>()) { auto expanded = expand_wildcard(pattern); infiles.insert(infiles.end(), expanded.begin(), expanded.end()); } } Do you have any good suggestions for troubleshooting the issue? When executing the command ./cimbar wht*.png, no errors are printed.

thank you

fighter-01 avatar Mar 21 '25 08:03 fighter-01

The commands look reasonable.

It's probably worth noting that the instructions are written with unix (linux, mac, cygwin/wsl) path expansion in mind. So when we say:

./cimbar outputprefix*.png -o ./

... what that looks like to the binary will be ./cimbar outputprefix_1.png outputprefix_2.png outputprefix_3.png -o ./ (for however many png files there are).

So one idea would be to try the expansion manually and see if that works. Another would be to use a terminal client that does it. I'm somewhat hesitant to add wildcard expansion inside the executable, since no other platform besides windows uses it -- but we can consider it.

edit: that said, there are all sorts of other things that might be going wrong after this. That the decode succeeds but produces garbled output is strange. That suggests there's some windows-specific bug/issue in the decoding logic

sz3 avatar Mar 21 '25 08:03 sz3

This is the encode command: ./cimbar --encode -i inputfile.txt -o outputprefix This is the decode command: ./cimbar outputprefix*.png -o ./

Do you have a pre compiled decoder on Windows? Is it convenient to share? I urgently need a compiled decoder that can run directly on Windows.

zhangzhancheng avatar Jun 23 '25 06:06 zhangzhancheng

Do you have a pre compiled decoder on Windows? Is it convenient to share? I urgently need a compiled decoder that can run directly on Windows.

It might be too late for your situation, but the beta version of the web decoder is now up at https://re.cimbar.org, and should (hopefully) work as an offline progressive web app (PWA).

sz3 avatar Aug 14 '25 23:08 sz3