The 02, 0003 & 004 are being interpreted as floats and not symbols which is why the leading 0s are dropped
Try using double quotes to force them to be interpreted as strings.
echo '"01" "02" "0003" "004" "05.txt"' | /usr/bin/pdsend 3001 localhost udp
This works for me on macOS, but the quotes remain with the symbols after receiving. Maybe there is another escape mechanism for this case?
udp: "01" "02" "0003" "004" "05.txt"
On Mar 17, 2021, at 11:40 AM, pd-list-request@lists.iem.at wrote:
Message: 4 Date: Wed, 17 Mar 2021 11:40:29 +0100 From: oliver <oliver@klingt.org mailto:oliver@klingt.org> To: pd-list@lists.iem.at mailto:pd-list@lists.iem.at Subject: [PD] symbols with zero paddings and spaces Message-ID: <20640105c3eb39645edcd41d3ad25287@mail.klingt.org mailto:20640105c3eb39645edcd41d3ad25287@mail.klingt.org> Content-Type: text/plain; charset=US-ASCII; format=flowed
hi, dear list !
when i try to send a symbol containing spaces AND numbers prepended by zeros with [pdsend], the zeros get truncated in unpredictable ways.
to see what i mean, please do the following:
1.) open the [netreceive] help patch 2.) open a console and try the following command:
========================== LINUX/OSX: ===============================
~$ echo "01 02 0003 004 05.txt" | /usr/bin/pdsend 3001 localhost udp
=========================== WINDOWS: ================================
echo "01 02 0003 004 05.txt" | "C:\Program Files\Pd\bin\pdsend.exe"
3001 localhost udp=====================================================================
the resulting output from [netreceive -u 3001] will be:
udp: "01 2 3 4 05.txt"
Dan Wilcox @danomatika http://twitter.com/danomatika danomatika.com http://danomatika.com/ robotcowboy.com http://robotcowboy.com/