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

Hans-Christoph Steiner hans at eds.org
Mon Jan 19 05:41:12 CET 2009

On Jan 17, 2009, at 1:58 PM, Martin Peach wrote:

> 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.
> Martin

I think Pd just filters { } \ and all other characters go thru... kind  
of.  Latin1 definitely works, and I've seen some other characters work  
in Pd patches.  This is one goal of the current pd-devel effort:  
removing arbitrary ASCII restrictions.  Tcl/Tk is unicode, so I don't  
think it would be too hard to make Pd fully Unicode, if someone wanted  
to take that on.  Having the GUI pure Tcl should make that easier.



'You people have such restrictive dress for women,’ she said, hobbling  
away in three inch heels and panty hose to finish out another pink- 
collar temp pool day.  - “Hijab Scene #2", by Mohja Kahf

More information about the Pd-list mailing list