encoding ean 128

User avatar
sal21
PlatinumLounger
Posts: 4334
Joined: 26 Apr 2010, 17:36

encoding ean 128

Post by sal21 »

I am using a workbook for encoding alphanumeric codes in ean 128.

the problem is that when I frame a barcode with an app, it encodes the barcode but it returns me a text that is not the same as the encoded one!

for example the one in column C value of row 4.

I have attached both the excel file and the tiff ean 128
You do not have the required permissions to view the files attached to this post.

User avatar
SpeakEasy
4StarLounger
Posts: 536
Joined: 27 Jun 2021, 10:46

Re: encoding ean 128

Post by SpeakEasy »

But you are NOT encoding them in ean 128, you are just transcribing via ANSI (so that a character 'A' would select the barcode symbol at char position 65 - but the barcode symbol at position 65 does NOT necessarily represent the letter A

But your spreadsheet contains the code do proper encoding (which would appear to be a version of the code found here: http://grandzebu.net/informatique/codbar-en/code128.htm, which is designed to work with the code128 font found on that samne page) So you should just need to change your formula from =A1 to =Code128(A1)

User avatar
sal21
PlatinumLounger
Posts: 4334
Joined: 26 Apr 2010, 17:36

Re: encoding ean 128

Post by sal21 »

SpeakEasy wrote:
25 Oct 2021, 17:03
But you are NOT encoding them in ean 128, you are just transcribing via ANSI (so that a character 'A' would select the barcode symbol at char position 65 - but the barcode symbol at position 65 does NOT necessarily represent the letter A

But your spreadsheet contains the code do proper encoding (which would appear to be a version of the code found here: http://grandzebu.net/informatique/codbar-en/code128.htm, which is designed to work with the code128 font found on that samne page) So you should just need to change your formula from =A1 to =Code128(A1)
but i have download from google play a bar code 128 reader, and when i track the bar code the app return, the text in c4. and not 546754754ABC. and not the original source text!

User avatar
SpeakEasy
4StarLounger
Posts: 536
Joined: 27 Jun 2021, 10:46

Re: encoding ean 128

Post by SpeakEasy »

I know. That's exactly what I am saying. You need to use the encoding VBA function contained in your spreadsheet. And make sure that you are using the code128.tty file that it is designed for. EAN 128 is not a simple substitution cypher, nor do all code 128 fonts (and you will find several of them available on the internet, but they do not all have the glyphs (the bar code characters) in the same place in the character set, so you - or your code, needs to know how the font is mapped)

Here's a very, very minor modification of your spreadsheet to illustrate this - BUT you will also need to ensure you have the CORRECT Code 128 font for it to work, which is the one shown on the page I linked to in my previous post, NOT the one you are currently trying to use; I'll link directly to it here: http://grandzebu.net/informatique/codbar/code128.ttf)

code 128.xlsm
You do not have the required permissions to view the files attached to this post.

User avatar
sal21
PlatinumLounger
Posts: 4334
Joined: 26 Apr 2010, 17:36

Re: encoding ean 128

Post by sal21 »

SpeakEasy wrote:
25 Oct 2021, 18:43
I know. That's exactly what I am saying. You need to use the encoding VBA function contained in your spreadsheet. And make sure that you are using the code128.tty file that it is designed for. EAN 128 is not a simple substitution cypher, nor do all code 128 fonts (and you will find several of them available on the internet, but they do not all have the glyphs (the bar code characters) in the same place in the character set, so you - or your code, needs to know how the font is mapped)

Here's a very, very minor modification of your spreadsheet to illustrate this - BUT you will also need to ensure you have the CORRECT Code 128 font for it to work, which is the one shown on the page I linked to in my previous post, NOT the one you are currently trying to use; I'll link directly to it here: http://grandzebu.net/informatique/codbar/code128.ttf)


code 128.xlsm
look what I see, in F, correct?
You do not have the required permissions to view the files attached to this post.

User avatar
SpeakEasy
4StarLounger
Posts: 536
Joined: 27 Jun 2021, 10:46

Re: encoding ean 128

Post by SpeakEasy »

No, not correct,, that is 100% a symptom of you using the wrong code 128 font.

here's what it looks like wih the right font
code128.png
You do not have the required permissions to view the files attached to this post.