MMS, encoded-string field | Search |
NowSMS Support Forums ⬆ MMS & SMS Technical Discussions (unsupported) ⬆ Archive through March 23, 2004 ⬆ |
◄ ► |
Author | Message | |||
Jonatan Unregistered guest |
I'm writing a PHP script to decode a MMS message, but I don't understand how the encoded-string fields work. Right now, I just try to decode the encoded-string fields as normal strings, but it seems like I get 0-2 characters in front of the real string, and I guess that is some codes for charsets isn't it? Example output: From: €+16505550000/TYPE=PLMN Subject: „rubrik If anyone could explain how that type of field works alitle bettar than the specification, I would be very happy! Thanks. /Jonatan Heyman | |||
Vitaliy N. Kravchenko New member Username: Kvn Post Number: 1 Registered: 10-2003 |
encoded string = string-len + string see wap-209 for more details... IMHO. | |||
Jonatan Unregistered guest |
I have read the specification, but I didn't fully understand it, so I was hopeing that someone could explain it to me in a better way. /Jonatan Heyman | |||
Bryce Norwood - NowSMS Support Board Administrator Username: Bryce Post Number: 1135 Registered: 10-2002 |
Jonatan, Can you post the binary that you are seeing ... along with your decoding of it. Then I will attempt to explain. It's probably a character set reference ... -bn | |||
Jonatan Unregistered guest |
Hi and thanks for the reply. The FROM field is encoded like this: 89 16 80 2B 31 36 35 30 35 35 35 30 30 30 30 2F 54 59 50 45 3D 50 4C 4D 4E 00 If you decode the string from 80 to 4E, you get this string: "€+16505550000/TYPE=PLMN" The value I'm interested in starts from the fourth byte, and I don't know what to do with those other bytes. Thanks. /Jonatan Heyman | |||
yanxh New member Username: Yanxh Post Number: 2 Registered: 11-2003 |
89 : From 16 : Length 80 : Address-present-token | |||
Bryce Norwood - NowSMS Support Board Administrator Username: Bryce Post Number: 1166 Registered: 10-2002 |
Jonatan, yanxh's reply is accurate. Please refer to Section 7.2.11 of the MMS Encapsulation specification (WAP-209), and it explains the encoding of the "From:" field. |