On 2015-08-21 13:22, John P. Hartmann wrote:
>
> Thus, the only viable way to process CSV data correctly (i.e.,
> compensating for downloading errors) is a new built-in that turns the
> field separating commas into something else, specified by the user. The
> program could verify that the input does not contain this separator
> character.
>
I would think most of this could be done with a Rexx stage. But if you
say a BIF is needed I trust you.
here's a fragment I use to embed arbitrary text in an HTML document:
* * * Top of File * * *
/* REXX entify_2Erexx Wed Mar 17 16:39:10 MDT 2010 */ signal on novalue;
'callpipe (name ENTIFY)',
'|*:',
'| change /&/&/' ,
'| change /"/"/' ,
'| change /</</' ,
'| change />/>/' ,
'|*:'
exit(RC)
* * * End of File * * *
one might add:
'| change /,/,/' , /* There seems to be a standard for this. */
(But only when not quoted.)
CRLF is Wincentric. Unix uses LF; z/OS UNIX System services uses NL;
Classic Mac uses CR. The only standards for any of these appear to be
hex ASCII code points.
> Of course, doing both is also possible, as long as there are no quoted
> CRLFs in inputRange CSV n.
>
> Preferences, anyone?
>
> PS: https://datatracker.ietf.org/doc/rfc7111/?include_text=1
>
The greatest thing about standards is that you can choose from among so many!
-- gil