Hi Ali,

The way to calculate checksum is clearly described in UCP spec.
But I see that you still can not understand this description.
Below there is a perl function to calculate checksum that I use in my projects. 
The input parament is UCP string without checksum.
Hope it will help you

Igor

sub _checksum {
    my $chk = 0; map { $chk+=$_; } unpack("C*",shift);
    sprintf("%02X",$chk%256);
}

-----Original Message-----
From: ali hadim [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 01, 2004 11:17 PM
To: [EMAIL PROTECTED]
Subject: UCP format and checksum


Hello All,  I need litte help for UCP format UCP format has checksum and I couldn't 
understand can you tell me how it is rule?
because I will prepare project and will do encode and decode structure? For example,

00/00087/O/54/012345/0111111//////1/0654321/0100/////010197120501////3///////////////4C

"4C" ?

Thanks...


 

Reply via email to