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

Error on zpl element "4030401100+67000000": EC128-6: Only numeric values can be encoded with C128-C (Invalid char at position 11) #151

Closed
bjt19882222 opened this issue Dec 16, 2022 · 12 comments · Fixed by #229
Assignees

Comments

@bjt19882222
Copy link

Hi,

i have an valid zpl file which can be converted here:
http://labelary.com/viewer.html

But on your site and with your script i get this error:
https://binarykits-zpl-viewer.azurewebsites.net/
Error on zpl element "4030401100+67000000": EC128-6: Only numeric values can be encoded with C128-C (Invalid char at position 11).

Why?
Can you help please?

@primo-ppcg
Copy link
Collaborator

The only way I can recreate this error is by explicitly forcing Type C on non-numeric data:

^XA
^FO10,10^BY2^BCN,40^FD>;4030401100+67000000^FS
^XZ

However, this produces a slightly different message. If you could provide the relevant ^BC command, it would help to determine if/what the issue is.

@samilalgul
Copy link

Type C data could not includes char or special chars?

@sibit
Copy link

sibit commented Jun 30, 2023

I have the same issue, I just detected right now. Did you get the solution?

thanks!

@primo-ppcg
Copy link
Collaborator

I have the same issue, I just detected right now. Did you get the solution?

Excellent. Could you provide the ZPL that produces the error?

@sibit
Copy link

sibit commented Jun 30, 2023

Hi! this is the sentence ZPL that I'm using into this software.
When I remove this part >890>6C1 is working properly (that part contains C1 into the barcode).
How I can add C1 or other text (Batch number sometimes contains text 'ABC123) into the Code128 or GS1-128?

Thanks a lot!

                    string pzpl = @"^XA^FO197,495^BY5^BCN,150,N,N^FD>;>89181752625>8103181450701>890>6C1^FS^FT239,691^CI0^A0N,50,68^FD(91) 81752625 (10) 3181450701 (90) C1^FS^PQ1,0,1,Y^XZ";

@primo-ppcg
Copy link
Collaborator

Not all escapes are supported in hand-rolled GS1, the relevant code is here:

// support hand-rolled GS1
content = content.Replace(">8", FNC1);
interpretation = interpretation.Replace(">8", "");
// TODO: support remaining escapes within a barcode

I'm currently working on a new Barcode rendering (#171), I'll add support for more escapes to GS1.

@sibit
Copy link

sibit commented Jul 3, 2023

Thanks primo-ppcg.
I really don't undestand why is not working with all scapes. This scape 90 or 91 is normal, or not?

@primo-ppcg
Copy link
Collaborator

primo-ppcg commented Jul 3, 2023

The part that can't be parsed is >6C1, which switches to codeset B for the final two characters.

@sibit
Copy link

sibit commented Jul 3, 2023

thanks for your answer. That is something that I can solve into the zpl barcode code, or is this issue into the c# project?

anyway, why I cannot add a breakpoint into Encode function?
using var image = barcodeElement.Encode(barcodeType, content);

I'm trying to help with this issue but I cannot access and check it! :(

@primo-ppcg
Copy link
Collaborator

The Encode method belongs to an external library. This error (and several others) will be resolved in the next release.

@primo-ppcg primo-ppcg assigned primo-ppcg and unassigned bjt19882222 Jul 7, 2023
@sibit
Copy link

sibit commented Sep 14, 2023

Hey dude!
how is going with your development?! :P

@primo-ppcg
Copy link
Collaborator

I was holding out for the next release of ZXing.Net, although I suppose that might not be any time soon. If I wanted to accelerate the release, I could possibly makes PRs for all of the upstream commits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants