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

How to force numeric QR code #17

Closed
movedoa opened this issue May 16, 2017 · 1 comment
Closed

How to force numeric QR code #17

movedoa opened this issue May 16, 2017 · 1 comment

Comments

@movedoa
Copy link

movedoa commented May 16, 2017

I tried to generate a simple numeric QR code with the content "123456".

But when i decode the generated qr code on https://zxing.org/w/decode.jspx it says that is is type text.
I just use the write method here.
Is there a way to force a numeric QR code?

@movedoa movedoa closed this as completed May 16, 2017
@movedoa movedoa reopened this May 16, 2017
@movedoa movedoa changed the title ZXing.BarcodeWriter Write Method adds "0a" How to force numeric QR code May 16, 2017
@micjahn
Copy link
Owner

micjahn commented May 16, 2017

You can't manually select the mode how the content should be encoded. The character 0x0A is added by the online reader page. If you decode the image with ZXing.Net you won't get it. I tried the complete encoding-decoding cycle with your content and everything works fine. Internally the encoding algorithm selected the NUMERIC encoding mode because there are only numbers. I checked it twice. The output "Parsed Result Type" = "TEXT" doesn't mean that the content is encode in ALPHANUMERIC mode. It only says, that the result contains unformatted text. Other types are vEvent, vCard, Calendar, SMS and so on. That information is from the class ZXing.Client.Result.ResultParser.

@micjahn micjahn closed this as completed May 16, 2017
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