<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 04/19/2015 03:46 PM, IOhannes m
      zmölnig wrote:<br>
    </div>
    <blockquote cite="mid:55340604.30302@iem.at" type="cite">
      <pre wrap="">On 04/19/2015 06:55 PM, Jonathan Wilkes via Pd-list wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">Hi list,
     Can utf8 data for a single utf8 character get split across a tcp
buffer?

>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
time.
</pre>
      </blockquote>
      <pre wrap="">
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.</pre>
    </blockquote>
    <br>
    Thanks.  There's a string-decoder lib that puts a buffer's extra
    "tail" bytes<br>
    in a separate bin so they can be prepended to the next buffer.  That
    sounds like<br>
    the way to go.<br>
    <br>
    I wonder if localhost is doing optimizations that make the problem
    unlikely to happen.<br>
    <br>
    <blockquote cite="mid:55340604.30302@iem.at" type="cite">
      <pre wrap="">

with TCP/IP you need a application-layer packetizing mechanism,
in FUDI this is the famous ";".</pre>
    </blockquote>
    <br>
    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.<br>
    <br>
    -Jonathan<br>
    <br>
    <blockquote cite="mid:55340604.30302@iem.at" type="cite">
      <pre wrap="">
iirc, in more popular protocols (like HTTP, SMTP, FTP) it is usually CRLF.


gfmasrd
IOhannes

</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
<a class="moz-txt-link-abbreviated" href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> mailing list
UNSUBSCRIBE and account-management -> <a class="moz-txt-link-freetext" href="http://lists.puredata.info/listinfo/pd-list">http://lists.puredata.info/listinfo/pd-list</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>