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

Fix output of FNC1 in first position needed for GS1 #145

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

warped-rudi
Copy link

It appears that this functionality was not fully implemented. Thus, code generation always failed when trying to use QRinput_setFNC1First().

Signed-off-by: Rüdiger Ihle [email protected]

@burlrice
Copy link

burlrice commented Nov 4, 2021

I'm new to this lib, and I'm still trying to familiarize myself with it. Could you share any sample code of how to encode the FNC1 character?

@warped-rudi
Copy link
Author

The basic sequence to create GS1 codes should be something like this:

QRinput *input;
QRcode  *qrcode;

input = QRinput_new2( version, QR_ECLEVEL_M );

QRinput_setFNC1First( input );
Split_splitStringToQRinput( codeString, input, QR_MODE_8, true );
qrcode = QRcode_encodeInput( input );

QRinput_free( input );

FNC1 symbols on other positions than the first are represented as '0x1d' inside of 'codeString' (when using QR_MODE_8) or '%' (when using QR_MODE_AN).

@burlrice
Copy link

burlrice commented Nov 5, 2021

Thank you. You just saved me a lot of time.

Is there any chance your branch will get merged into the master repo?

@warped-rudi
Copy link
Author

I have no idea. I sent this pull request two years ago and it never got any attention.

@fukuchi
Copy link
Owner

fukuchi commented Nov 7, 2021

Hi @warped-rudi, @burlrice,

Thank you all for the discussion and the great contribution. I'll review and apply the request as soon as possible.

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

Successfully merging this pull request may close these issues.

3 participants