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-requ...@lists.iem.at wrote:
> 
> Message: 4
> Date: Wed, 17 Mar 2021 11:40:29 +0100
> From: oliver <oli...@klingt.org <mailto:oli...@klingt.org>>
> To: pd-list@lists.iem.at <mailto:pd-list@lists.iem.at>
> Subject: [PD] symbols with zero paddings and spaces
> Message-ID: <20640105c3eb39645edcd41d3ad25...@mail.klingt.org 
> <mailto:20640105c3eb39645edcd41d3ad25...@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/>



_______________________________________________
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list

Reply via email to