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

Allow to create GS1 DataMatrix #88

Open
awiz911 opened this issue Mar 20, 2025 · 0 comments
Open

Allow to create GS1 DataMatrix #88

awiz911 opened this issue Mar 20, 2025 · 0 comments

Comments

@awiz911
Copy link

awiz911 commented Mar 20, 2025

At the moment it doesn't allow to do that. Because it doesn't understand FNC1 at the start of string and you can't pass it, it will split it in 2 bytes at best.

However this peace of code will solve it easily(checked and doublechecked):

instead of (in datamatrix package in encoder.go)

func encodeText(content string) []byte { var result []byte

it's possible to init result like so:

result := []byte{232}

this way it doesn't get processed with other content and we have required FNC1 at the start of our DataMatrix
sending FNC1 in initial content is problematic, cuz it reads it as 2 bytes and gives double FNC1 in result at best

p>s> guess it would be best to do this in separate package DataMatrixGS1 to keep backward compatability ))) cuz some scanners might not recognize it

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