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

Get raw data from datamatrix code #100

Open
goodbooroondook opened this issue Nov 3, 2022 · 0 comments
Open

Get raw data from datamatrix code #100

goodbooroondook opened this issue Nov 3, 2022 · 0 comments

Comments

@goodbooroondook
Copy link

Hello!

Is it possible to get raw data without any modification from results? after decoding?

For exmaple,
original code data: 01086912345678902113234246791707011910X2512061322,
data after decoding: ]d201086912345678902113234246791707011910X2512061322.

Yes, this modification happen according standard, but it would be useful to keep information about original data for some tasks.

As I can see, all FNC symbols after first position will be replaced.

while (!done && bits.available() >= 8) { int oneByte = bits.readBits(8); switch (oneByte) { case 0: throw FormatError("invalid 0 code word"); case 129: done = true; break; // Pad -> we are done, ignore the rest of the bits case 230: DecodeC40OrTextSegment(bits, result, Mode::C40); break; case 231: DecodeBase256Segment(bits, result); break; case 232: // FNC1 // Only recognizing an FNC1 as first/second by codeword position (aka symbol character position), not // by decoded character position, i.e. not recognizing a C40/Text encoded FNC1 (which requires a latch // and a shift) if (bits.byteOffset() == firstFNC1Position) result.symbology.modifier = '2'; // GS1 else if (bits.byteOffset() == firstFNC1Position + 1) result.symbology.modifier = '3'; // AIM, note no AIM Application Indicator format defined, ISO 16022:2006 11.2 else result.push_back((char)29); // translate as ASCII 29 <GS> break;

Or I'm missing something?

Best regards

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

1 participant