Is there some locale thing happening on fileUrl? Just curious why the cut & paste of debug statements shows up with formatting (italics and color) on the URL. Stab in the dark, I dunno.
What do you get if you set fileUrl to a test string and try it?
“The forums will try to automatically detect what language you are typing and style your code accordingly. This might be nice for sharing code, but tends to produce strange results when sharing other preformatted text. To avoid the automatic styling, declare your code to be “raw text” by typing text after the first 3 back ticks.” (Link)
Since 7.82.0, the curl parameter is ignored. Prior to that there was per-handle character conversion support for some very old operating systems such as TPF, but it was otherwise ignored.
I believe this has to do with how you call the DEBUG-macro; it is supposed to be called somewhat like printf, i.e. like DEBUG(format-str, ...).
Running the following snippet as part of loading a dummy module produces essentially expected results.
Compiling and running this on Arch Linux produces the following to appear in the Rack log. The plain iostream printouts gives the correct result, as does the second set of DEBUG-printouts. In the first set of DEBUG-printouts, where there is no format string, the actual string to print is interpreted as being the format string, which presumably garbles things. I did not dig deeper into what it actually does (edit: but as % is significant in the format string, presumably parts of the encoded string gets interpreted as being formatting specifications, like %3A and %2F specifying different floating point formats).
Interesting. I never thought about the case where the string looks like a format string with substitutions. Of courses printf with a plain string works fine. In any case, looks like you found the answer.
I’m still somewhat new to this whole VCV Rack thing, so I don’t yet have many requests; I’m busy just digging around testing all the stuff, trying to figure out how things work. But I’ll keep your offer as a rain check!