Using SHIFT with C128AMA

General discussion about Morovia barcode fonts, OCR/MICR fonts and postal fonts.

Using SHIFT with C128AMA

Postby Calendarium (Legacy Member) on Sat Dec 25, 2004 3:07 am

I want to print this bar code with HR Text:

ABCSHIFTdABC

The start char is START A. A SHIFT char will switch the char d to data set B. Can I use FontPal to encode this string? It seems I will need to use two fonts to display this string, can the FontPal program copy two fonts for me automatically?



Edited by Calendarium on December 25 2004 at 3:10am
Calendarium (Legacy Member)
 

Re: Using SHIFT with C128AMA

Postby glitch (legacy member) on Mon Dec 27, 2004 10:00 am

Currently Fontpal does not support encoding SHIFT character. The corresponding function, Code128A filters out d since the lower case d does not belong to Code128 set A.

You can write you own routine to deal with SHIFT character. The SHIFT character is mapped to character 0xC3. And character d still mapps to d. (http://www.morovia.com/font/code128.asp ... %20Mapping)

After that you need to calculate the checksum. The algorithm is outlined at http://www.morovia.com/education/symbology/code128.asp. Take the example of your string ABCshiftdABC.

Value for A: 33, B: 34, C:35 SHIFT:98, d:68. Adding weight 1*103 +1*33+2*34+3*35+4*98+5*68+6*33+7*34+8*35=1757. Divide 1757 by 103 and get the remainder 6.

Reverse lookup the mapping table, value 6 character is mapped to &.

Adding start, stop and termination bar, we get

ÉABCÃdABC&ËÍ

Format the string above with a non-human readable font such as Code128M you get the right barcode. If you want to format the human readable, you can format the whole string with Code128AMA except character d with Code128BMA. If you do not like the extra text added by the checksum character &, you can format this character & with Code128M. The start/stop/termination/shift characters do not have human readable so you can format with any font, as long the height keeps the same.

[MRV CODE128AMA]ÉABCÃ[MRV CODE128BMA]d[MRV CODE128AMA]ABC&ËÍ



Edited by glitch on December 27 2004 at 10:01am
glitch (legacy member)
 

Re: Using SHIFT with C128AMA

Postby Calendarium (Legacy Member) on Thu Dec 30, 2004 3:53 am

In another word, When using Code128xxA, I have to use another Code128 font to display the check digit if I do not want to see human the readable text in the check digit?

Does the check digit have a known maximum value? For example, 103 or 128?



Edited by Calendarium on December 30 2004 at 3:54am
Calendarium (Legacy Member)
 

Re: Using SHIFT with C128AMA

Postby glitch (legacy member) on Thu Dec 30, 2004 12:20 pm

Code128 checksum is based on Mod 103 so it can not exceed 103 in value. But be aware that the value is not equal to the character code, since we have to use printable character range to represent Code128 characters.

The checksum character can be any one within the character set. If it happends to be a character with no HR (such as control characters in set A), there is no HR text. But there is no guarrantee to that so you would be better off format it with a non-human readable font.
glitch (legacy member)
 


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest