Comments (8)
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.
- https://www.codetwo.de/freeware/qr-code-desktop-reader/ --> can't read the code
- https://play.google.com/store/apps/details?id=com.google.zxing.client.android&hl=de --> can read the code
- http://qrlogo.kaarposoft.dk/qrdecode.html --> can read the code and in addition, says that there are no errors. (Check the "debug log" checkbox.)
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.
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.
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.
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.
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.
Could it be when he reads this data in, the /n are omitted?
from qrcoder.
@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.
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)
- [WIP] How do we split the QRCoder? (NuGet packages) HOT 3
- [WIP/QRCoder2] How do we split the QRCoder? (Github repositories) HOT 1
- [WIP/QRCoder2] Version number handling HOT 1
- [WIP/QRCoder2] Documentation and wiki HOT 2
- [WIP/QRCoder2] How do we handle changes during the 2.0 development? HOT 2
- [WIP/QRCoder2] Coordination of development (VCS) HOT 1
- [WIP/QRCoder2] Coordination of development (Organization) HOT 1
- [WIP/QRCoder2] Communication tools besides Github? HOT 1
- [WIP/QRCoder2] System.Drawing vs X HOT 2
- [WIP/QRCoder2] Use of System.Drawing.Primitives HOT 1
- [WIP/QRCoder2] How do deal with COM-support? HOT 5
- [WIP/QRCoder2] Shall we re-think the Payload Generator? HOT 7
- [WIP/QRCoder2] Consider Removing QRCodeGenerator Instance Methods
- [WIP/QRCoder2] Which frameworks and language version to target HOT 3
- vCard to QRCoder - diacritics problem HOT 8
- [WIP/QRCoder2] Consider Removing Nested Types from Public API Signatures HOT 2
- [WIP/QRCoder2] Consider Updated Abstractions HOT 12
- Is there a plan to support QRCode parsing HOT 1
- In Linux system, which class do I use to generate QR codes with iocn? HOT 1
- How to get QR bytes in Blazor app .NET8? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qrcoder.