Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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. #122

Open
fighter-01 opened this issue Mar 21, 2025 · 5 comments

Comments

@fighter-01
Copy link

No description provided.

@sz3
Copy link
Owner

sz3 commented Mar 21, 2025

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

@fighter-01
Copy link
Author

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

@fighter-01
Copy link
Author

@fighter-01
Copy link
Author

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

@sz3
Copy link
Owner

sz3 commented Mar 21, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants