[PD] utf8 over tcp
jancsika at yahoo.com
Sun Apr 19 22:45:20 CEST 2015
On 04/19/2015 03:46 PM, IOhannes m zmölnig wrote:
> On 04/19/2015 06:55 PM, Jonathan Wilkes via Pd-list wrote:
>> Hi list,
>> Can utf8 data for a single utf8 character get split across a tcp
>> From what I understand the answer must be yes, and I should check for
>> incomplete utf8 data on the GUI at the end of the buffer. However I'm
>> not doing that atm, and I can't trigger any errors (like copy pasting
>> 500 messages with a utf8 snowman in them). I get perfect snowmen every
> since TCP/IP is totally packet agnostic, thou shalt not rely on it's
> packetizing capabilities.
> if your receiver emits packets the same as you sent them, then you were
> merely lucky.
Thanks. There's a string-decoder lib that puts a buffer's extra "tail"
in a separate bin so they can be prepended to the next buffer. That
the way to go.
I wonder if localhost is doing optimizations that make the problem
unlikely to happen.
> with TCP/IP you need a application-layer packetizing mechanism,
> in FUDI this is the famous ";".
Right, but one can easily lose data before that part of the algorithm
happens. Node's Buffer API makes this extremely easy to do. The
string-decoder lib makes it easy to remedy, though.
> iirc, in more popular protocols (like HTTP, SMTP, FTP) it is usually CRLF.
> Pd-list at lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pd-list