You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was wondering if the experts of the server side world would take a look at the preserve newlines patch, I've uploaded it with this issue.
Now, obviously, the patch itself is wildly out of date, especially considering it was made for lambdamoo, not toast.
But I wanted to touch on the principle of the matter in so far as how it escapes the \n and \r\n strings to stop the breaking of the database structure overall.
In toaststunt, I've seen it put ~0A in place of newlines in exec for instance, so would this work for the case of this patch?
EG instead of:
case '\n':
fputc('\0', output);
fputc('n', output);
You'd have:
fputc('~0A1', output);
I'm assuming it'd have to be a call to fputc for each character in ~0A1 but you get the idea.
My questions are:
Would this be safe? How much of a chance does this have of taking database integrity and tossing it out of the nearest window.
Surely there's a more efficient way to do it than iterating through each character and calling fputc? Maybe I'm coming from a python background and not realising how much heavily lifting c can do but that seems... Inefficient at best?
Hi there,
I was wondering if the experts of the server side world would take a look at the preserve newlines patch, I've uploaded it with this issue.
Now, obviously, the patch itself is wildly out of date, especially considering it was made for lambdamoo, not toast.
But I wanted to touch on the principle of the matter in so far as how it escapes the \n and \r\n strings to stop the breaking of the database structure overall.
In toaststunt, I've seen it put ~0A in place of newlines in exec for instance, so would this work for the case of this patch?
EG instead of:
case '\n':
fputc('\0', output);
fputc('n', output);
You'd have:
fputc('~0A1', output);
I'm assuming it'd have to be a call to fputc for each character in ~0A1 but you get the idea.
My questions are:
Thoughts welcome.
preserve-newlines.patch.txt
The text was updated successfully, but these errors were encountered: