[PD] [list fromsymbol] and non-breaking spaces

Roman Haefeli reduzent at gmail.com
Tue Sep 13 09:16:35 CEST 2016


On Mon, 2016-09-12 at 10:02 +0000, Liam Goodacre wrote:
> When I put a symbol containing a non-breaking space ( ASCII code 160)
> through [list fromsymbol], it generates a ghost character, 194, which
> is the ASCII code for Â. Is this a bug, or is there a reason for it?


From what I understand, Pd uses UTF-8 when decoding or encoding
strings. '194 160' (a.k.a hex C2 A0) is the correct byte sequence for
non breaking space in the UTF-8 format. I'm more surprised to see that
the sequences '99 160 99' and '100 194 100' show a meaningful result
instead of a '�'. 

By the way, ASCII defines only the code points from 0 to 127. dec 160
is defined in ISO-8859-1 / Latin1 as non-breaking space. So, it seems
Pd somehow falls back to Latin1 when the input cannot be UTF-8 decoded.

Roman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20160913/947ec0a1/attachment.sig>


More information about the Pd-list mailing list