[jdev] problem in voice mail

Norman Rasmussen norman at rasmussen.co.za
Tue May 8 16:45:02 CDT 2007


On 5/8/07, mostafa hamza <hamzawey at gmail.com> wrote:
> what i am developing right now is sending voice mail through jabber.  the
> message is just for 20 seconds. i was trying to send it as a body in a
> message. i send it as  an array of bytes. at the other side when i print
> these bytes i got them totally different (most of the characters are
> question marks). could anybody help me in that problem?

Messages MUST be utf-8 encoded, so you'll find you can't just dump
your binary bits in the message.  Rather base64 encode the data,
before putting it into the packet, and decode it on the other side.

Of course it goes without saying that you should be using XEP-0047 or
even XEP-0065.

-- 
- Norman Rasmussen
 - Email: norman at rasmussen.co.za
 - Home page: http://norman.rasmussen.co.za/



More information about the JDev mailing list