good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: Unknown charactersby mvaline (Friar) |
on Feb 08, 2011 at 23:58 UTC ( [id://887091]=note: print w/replies, xml ) | Need Help?? |
I suspect an encoding problem. Is the socket operating on bytes or characters? Can you view a hexdump of the source lines to check what bytes you're actually receiving? I believe the AIVDM payload is an ASCII-encoded bit vector. By default, sockets operate on bytes. Try using the :encoding pragma when you open the socket to set it to operate on characters.
In Section
Seekers of Perl Wisdom
|
|