[PD] un-routable output from [text get]

Roman Haefeli reduzent at gmail.com
Tue Feb 7 08:59:07 CET 2017


Hi Liam

On Die, 2017-02-07 at 07:34 +0000, Liam Goodacre wrote:
> I'm getting some strange behavior when reading a .txt file with [text
> define], where the output from [text get] isn't routeable like a
> normal list. See the attached file for an example. Do other users
> experience the same thing?
> 
> [text fromsymbol] reveals that there are some extended ASCII 
> characters junking around in front of the problematic term. Is PD
> accidentally reading some meta-data from the text file?
> 
> Currently, it only seems to be happening on the first line of the
> file. I think I remember having the same problems throughout a
> textfile, although I can't replicate this now.
> 
> Any suggestions?

It seems that Pd reads the BOM (Byte Order Mark) of the Unicode text
file as part of the content instead of skipping it.

However, you don't necessarily need your text file to have a BOM. In
your example there aren't even any non-ASCII characters. You can remove
the BOM by doing:

tail --bytes=+4 strange.txt > strange_new.txt

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/20170207/20baab2f/attachment.sig>


More information about the Pd-list mailing list