[PD] makefilename query
matju at artengine.ca
Fri Jan 5 15:56:24 CET 2007
On Fri, 5 Jan 2007, timon wrote:
> I need to get the index (or decimal) value of a character. I know I can
> get the reversed result through [makefilename %c]. [Ascseq] does it but
> not with an extended character set. So Im wondering if there is a
> [makefilename %?] that can achieve that.
[makefilename] can only produce a symbol, so it'll never do what you want
it to be. [ascseq] (or another similar object) is on the right path, but
it only extracts bytes, which is only valid for 8-bit charsets like
iso-8859-1 and such.
UTF-8 is a variable-size charset, which is 8-bit, 16-bit or 24-bit
depending on the character. I think that it's possible to make a decoder
abstraction for that using [ascseq] and less than a pageful of objects,
but I don't know the UTF-8 specification so I can't do this for you.
_ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju
| Freelance Digital Arts Engineer, Montréal QC Canada
More information about the Pd-list