Cabbage Logo
Back to Cabbage Site

Characters that Cabbage/Csound can't process

For the past couple of days, I’ve been getting a compile error saying that Csound wasn’t expecting a string, and it would stop. But when I commented out that particular line, everything was fine.

This error totally made no sense to me because the string being passed was a string made with sprintf, and all the parts of the components that made up string were valid.

I then noticed a strange behavior where only on this line, no matter where I put the cursor, it appeared to edit a character two away from where the cursor was. This was driving me nuts, so I decided to retype the entire line, and immediately when I did this, everything compiled no issues.

Sorry for the long story, but my question is are there characters that will cause errors in Csound, which also do NOT show up in Cabbage? I can only think the error was caused by a misplaced non-displaying character outside of the Csound set.

I can’t say for sure, but I assume that Csound can’t handle non ascii characters. I’ve seen this problem before where I’ve copied and pasted code into Cabbage from somewhere. I generally tend to get get caught out on the " versus “ the sccond will cause an error for Csound, while the first quotation mark is correct. It’s a pain, but I’m not sure what Cabbage can do about :thinking:

Just another case where Csounds error messages are of no use…

I’ve seen this problem before where I’ve copied and pasted code … from somewhere.

I have already met this kind of problem. Copy/paste from some text editors led me to syntax errors in “PHP” for example. Due to invisible characters, the string seems to be ok, but an error is raised until you retype it. (sorry for my frenglish)

1 Like