[PD] request for objections: any2string -> unsigned char

Martin Peach martin.peach at sympatico.ca
Sat Jan 17 21:58:32 CET 2009

Mathieu Bouchard wrote:
> On Sat, 17 Jan 2009, Bryan Jurish wrote:
>> OK.  I guess I'll make unsigned values the default for [any2string] 
>> then, postponing the issue of name change to [any2bytes] rsp. 
>> [bytes2any] to a hypothetical future in which the "string" suffix 
>> implies unicode or other non-byte-oriented representation.
> Make an alias to [any2bytes] anyway, and encourage people to make the 
> distinction right away, so that [any2string] in the future would take 
> care of encodings while [any2bytes] would not.
> Or else, [any2string] could take an argument for the charset, maybe.

Am I missing something here? How does one make a symbol or a message or 
anything at all in pd using for example chinese or arabic characters?
I thought it was ASCII all the way, and even then there are reserved 
characters that get snagged by tcl.

The term 'string' seems to have two separate meanings in this thread. 
One designates a string of text, for presentation. The other designates 
a string of bytes, for transmission. I think [any2string] is intended 
for purposes of serialization, to send data through a byte-oriented 
channel such as a serial port, ethernet, or file.

Maybe for text an [any2symbol] is what is needed. It would convert text 
in any encoding to a valid pd symbol. The symbol could then be passed 
through [any2string] to get the raw bytes.


More information about the Pd-list mailing list