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

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list

Reply via email to