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

Encoding algorithm is wrong! #9

Closed MadDogMayCry0 closed 2 years ago

MadDogMayCry0 commented 2 years ago

When u don't use

buildUtf();

function, it's works like a charm. So, then i did not understand why example includes this function. All i need to get it to works:

char sms[240]="Hello"; // will be 7bit encoded
char sms[140]="Hello 明けましておめでとうございます。"; //will be 16 bit encoded
strcpy(msg,sms);
len = mypdu.encodePDU("+**********",msg);

Pls, tell me, why do i need buildUtf() and how it's works?