mgaman / PDUlib

Encode/Decode PDU strings for use with most GSM modems. Both 7 bit and 16 bit alphabets are supported.
GNU Lesser General Public License v2.1
22 stars 10 forks source link

Decoding PDU with english characters sometimes is wrong. #34

Closed EliasA97 closed 1 year ago

EliasA97 commented 1 year ago

Hello, during my tests I found that some pdu decodes using the english alphabet were a bit wrong. I sent from my phone this message PUMP ON This is the PDU I received 07910396539900F0040C9103968314168400002221317093738007D06A130A7A3A01

When I decode it, it prints this: PUMP ON@ It appears a "@" character at the end of mypdu.getText()

On the other side, if I send PUMP OFF, it prints just fine.

This shouldn't be a problem unless you compare strings to turn on or off things.

Library version I'm using is 0.5.7

mgaman commented 1 year ago

Which version are you using? This is covered in Issue #33 and was fixed in version 0.5.7 Please upgrade your installation and try again.