[PD] Comma in Textfile Vanilla Solution

Roman Haefeli reduzent at gmail.com
Sun Jan 26 12:08:24 CET 2014


On Sam, 2014-01-25 at 18:09 -0500, me.grimm wrote:
> I didnt realize this was a problem until i tried to read a textfile
> with a comma in it (yes escaped with a \)
> 
> so "hello\,world;" gives me:
> 
> 
> hello\\,world
> 
> 
> now what?

What would you rather expect to see within Pd? Non-escaped commas or
single-escaped commas? What version of Pd is that?

I made a small test with most recent 0.45 from git and my results are
somewhat different, though still a bit messy:

----text--
\, comma at the beginning;
comma\, right after first word;
comma in\, the middle;
comma at the end\,;
----/text---

gives:

----print--
print: , comma at the beginning
print: comma, right after first word
print: comma in\, the middle
print: comma at the end\,
----/print--

While commas at the beginning or after the first word are displayed
unescaped, all other commas are shown with escaping character. Is that a
bug? Am I right in thinking it would be desirable if escaping characters
wouldn't be displayed at all?

It might be worth to note that feeding those lines to another [textfile]
leads to a text file identical to the source which might indicate this
is only a displaying issue.

Roman







More information about the Pd-list mailing list