<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>pdsend/pdreceive uses the FUDI protocol (= Pd messages), where
strings that look like floats are converted to a float atom. When
serializing between FUDI strings and Pd atoms, the textual result
is not guaranteed to be the same for number atoms.</p>
<p>
<blockquote type="cite">the resulting output from [netreceive -u
3001] will be:
<br>
<br>
udp: "01 2 3 4 05.txt"
</blockquote>
Are you sure? Because I get</p>
<pre>1 2 3 4 05.txt</pre>
<p>which is what I would expect. The float atoms are properly
serialized to their string representation (Pd doesn't remember the
original text!) and "05.txt" is actually a symbol.</p>
<p>
<blockquote type="cite">is there any way to sent such a symbol
untruncated using the methods above,</blockquote>
If you want to send it as a single symbol, that's possible, you
just have to escape the whitespace:</p>
<pre>"01\ 02\ 0003\ 004\ 05.txt"</pre>
<p>Now, if you want to send the tokens as individual symbols, you
can escape them with a backslash:</p>
<pre>"01 \02 \0003 \004 \05.txt"</pre>
<p>Note the different position of the backslash! I'm not sure if
this particular escaping behavior is actually intended or just
works by chance... Generally, it would be great to document Pd's
string escaping, because it is not entirely obvious.</p>
<p>Christof<br>
</p>
<div class="moz-cite-prefix">On 17.03.2021 11:40, oliver wrote:<br>
</div>
<blockquote type="cite"
cite="mid:20640105c3eb39645edcd41d3ad25287@mail.klingt.org">hi,
dear list !
<br>
<br>
when i try to send a symbol containing spaces AND numbers
prepended by zeros with [pdsend], the zeros get truncated in
unpredictable ways.
<br>
<br>
to see what i mean, please do the following:
<br>
<br>
1.) open the [netreceive] help patch
<br>
2.) open a console and try the following command:
<br>
<br>
========================== LINUX/OSX:
===============================
<br>
<br>
~$ echo "01 02 0003 004 05.txt" | /usr/bin/pdsend 3001 localhost
udp
<br>
<br>
=========================== WINDOWS:
================================
<br>
<br>
<blockquote type="cite">echo "01 02 0003 004 05.txt" | "C:\Program
Files\Pd\bin\pdsend.exe" 3001 localhost udp
<br>
</blockquote>
<br>
=====================================================================
<br>
<br>
the resulting output from [netreceive -u 3001] will be:
<br>
<br>
udp: "01 2 3 4 05.txt"
<br>
<br>
<br>
the same is true if a symbol like this is sent from a .tcl script
to a corresponding [receive] object in a PD patch
<br>
(using the "::pd_connect::pdsend" function).
<br>
<br>
is there any way to sent such a symbol untruncated using the
methods above, other than transforming them first to ascii code
numbers and send them as a list of numbers, using [list tosymbol]
later in the "PD-world" to symbolize it?
<br>
<br>
thanks for all clarifications
<br>
<br>
oliver
<br>
<br>
<br>
<br>
_______________________________________________
<br>
<a class="moz-txt-link-abbreviated" href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> mailing list
<br>
UNSUBSCRIBE and account-management ->
<a class="moz-txt-link-freetext" href="https://lists.puredata.info/listinfo/pd-list">https://lists.puredata.info/listinfo/pd-list</a>
<br>
</blockquote>
</body>
</html>