Code 128 Logic Using Unicode

Stephen J. Orth (5/16/14 11:54AM)
Stephen J. Orth (5/16/14 12:00PM)
Stephen J. Orth (5/16/14 12:13PM)
bob.miller at parker.com (5/16/14 1:10PM)


Stephen J. Orth (5/16/14 11:54 AM)

Technical'"
<4d_tech@...

Miyako,

Thanks for the quick response...

I tested the following line of code in both V21004 and V13.5:

¬=A0¬=A0¬=A0¬=A0$return:=Char(143)

In V2004 it returned the correct value, in V13.5 it returned an
incorrect value.

This incorrect value is why our bar codes are not scanning.

Steve

-----Original Message-----
From: Keisuke Miyako [mailto:Keisuke.Miyako@...
Sent: Friday, May 16, 2014 11:49 AM

Cc: s.orth@...

"ascii" character 143 is 143 in unicode too.

so I would imagine it is the rest of the code that needs to be
reviewed, not that portion you quoted...

C_BLOB($ascii)
SET BLOB SIZE($ascii;1)
$ascii{0}:=143
$code:=Character code(Convert to text($ascii;"MacRoman"))

= 232

C_BLOB($ascii)
SET BLOB SIZE($ascii;1)
$ascii{0}:=143
$code:=Character code(Convert to text($ascii;"Windows-1252"))

= 143

On 2014/05/17 1:34, "Stephen J. Orth" <s.orth@...
wrote:

color><param>00000,0000,DDEE/param>=¬=A0¬=A0¬=A0$return:=Char(143)

However, in UNICODE mode, this does not return the correct value, and
the bar code is not able to be scanned.

Is there a way to translate these ASCII values correctly in UNICODE
MODE?
/color>

?=A5¬=AE¬=AE?=A5¬=8F¬=A4 ?=A5?=80¢=E2&Auml;&uacute;?=A4¬=BB?
&Auml;?
?=A3?=80&ouml;¬=BB?=A3?=92¬=BC?=A3?=92¬=AB?=A3?=80&ouml;¬
?=C3£=C6&iacute;¬=BB?=A3?=80&ouml;¬=A8?=A3?=92¬=B3?=A3?=80&ouml;
¬=B8?=A3?=92?=80?=C3£=E2&Auml;&ouml;¬=A2

?=A6¬=A0¬=AA?=A5¬=BC¬=8F?=A4¬=BC?=A1?=A7¬=A4¬=BE?
£=C6&iacute;?=80¢=C3£=E2&Auml;&ouml;¬=A9?=A3?=92¬=BC?=A3?=92?=80
°=C3£=E2&Auml;&ouml;¬=A3?=A3?=92¬=BC?=A3?=92¬=BB?=A3?=80&ouml;
¬=B8?=A3?=92¬=A3?=A3?=92?=80&ograve;?=A3?=92¬=B3
?=A3?=82¨=E2&Auml;&ocirc;150-0043
?=A6¬=9D¬=B1?=A4¬=BA¬=AC?=A9?=92¬=BD?=A6¬=B8?=80?
?=A8¬=B0¬=B7?=A5?=92¬=BA?=A9¬=81?=80&uacute;?=A7?=BD?=80
&ucirc;?=A5¬=9D?=80&ouml;1-10-2 ?=A6¬=B8?=80?=C3&reg;¬=B0¬=B7TH?
£=C6&iacute;?=80&uacute;?=A3?=92¬=AB6F
Tel: 03-6427-8441
Fax: 03-6427-8449

Keisuke.Miyako@...
www.4D.com/JP

Stephen J. Orth (5/16/14 12:00 PM)

Technical'"
<4d_tech@...

Miyako,

Just for further clarification...

I used the following value: ¬=A011844D

In V2004, the return result is: ¬=A0?=83¬=A811844D%?=83¬=AB
(will scan)

In V13.5, the return result is: ¬=A0?=82¬=8F11844D%?=A2?=82¨=CB
&uacute; ¬=A0(will not scan)

This is using the exact same code in both versions, so I'm a bit
confused.

Steve

-----Original Message-----
From: Keisuke Miyako [mailto:Keisuke.Miyako@...
Sent: Friday, May 16, 2014 11:49 AM

Cc: s.orth@...

"ascii" character 143 is 143 in unicode too.

so I would imagine it is the rest of the code that needs to be
reviewed, not that portion you quoted...

C_BLOB($ascii)
SET BLOB SIZE($ascii;1)
$ascii{0}:=143
$code:=Character code(Convert to text($ascii;"MacRoman"))

= 232

C_BLOB($ascii)
SET BLOB SIZE($ascii;1)
$ascii{0}:=143
$code:=Character code(Convert to text($ascii;"Windows-1252"))

= 143

Stephen J. Orth (5/16/14 12:13 PM)

Bob,

Thanks for the answer, and I wish it were that simple.

It is for the 143 code, since that is a constant for the start of the
bar
code. ¬=A0However, on Code 128 you have to have a check sum on that
back
end,
and this is based upon the characters being coded.

Steve

-----Original Message-----
From: 4d_tech-bounces@...
[mailto:4d_tech-bounces@... On
Behalf Of bob.miller@...
Sent: Friday, May 16, 2014 12:11 PM

Hi Steve,

I ran into an issue similar to this, though not related to Code 128.
Turns
out the Unicode character code (number) for my character was simply
different in a Unicode environment from before, in a pre-Unicode
environment.

Take an existing Code 128 barcode, scan it, and using 4D parse the
first few
characters. ¬=A0You might find that while the code was created with
char(143) in a non-Unicode enabled 4D, when you read it back in a
Unicode
enabled 4D, it is some other character code.

Hopefully it is that simple, and you can simply substitute the new
character
code for 143 in your code that creates future barcodes.

HTH,

Bob Miller
Chomerics, a division of Parker Hannifin Corporation

bob.miller at parker.com (5/16/14 1:10 PM)

<OF1B71843E.37DE5FD9-ON85257CDA.005DC5D5-85257CDA.005E43DC@...

Hi Steve,

I ran into an issue similar to this, though not related to Code 128.
Turns
out the Unicode character code (number) for my character was simply
different in a Unicode environment from before, in a pre-Unicode
environment.

Take an existing Code 128 barcode, scan it, and using 4D parse the
first
few characters. ¬=A0You might find that while the code was created
with
char(143) in a non-Unicode enabled 4D, when you read it back in a
Unicode
enabled 4D, it is some other character code.

Hopefully it is that simple, and you can simply substitute the new
character code for 143 in your code that creates future barcodes.

HTH,

Bob Miller
Chomerics, a division of Parker Hannifin Corporation

Reply to this message

Summary created 5/16/14 at 1:14PM by Intellex Corporation

Comments welcome at: feedback@intellexcorp.com