CSV again.

Bob Sneidar bobsneidar at iotecdigital.com
Fri Oct 16 11:28:06 EDT 2015

But what if the cr or lf or crlf is inside quoted text, meaning it is not a delimiter? Oh, I'm afraid the deflector shield will be quite operational when your friends arrive.

Bob S

> On Oct 16, 2015, at 08:04 , Alex Tweedly <alex at tweedly.net> wrote:
> Hi Mike,
> thanks for that additional info.
> I *think* (it's been 3 years) I left them as <GS> (i.e. numtochar(29)) because I had some data including normal TAB characters within the cells (!!( and thought <GS> was a safer bet - though of course nothing is completely safe. It's then up to the caller to decide whether to do "replace numtochar(29) with TAB in ...", or do TAB escaping, or whatever they want.
> As for the other bigger problem ....   Oh dear = CR vs LF vs CRLF ....
> Are you on Mac or Windows or Linux ?
> How is the LF delimited data getting into your app ?
> Maybe we should just add a "replace chartonum(13) with CR in pData" ?
> (I confess to being confused by this - I know that LC does auto-translation of line delimiters at various places, but I'm not sure when it is, or isn't, completely safe. Maybe the easiest thing is to jst do all the translations ....
>  replace CRLF with CR in pData
>  replace numtochar(10) with CR in pData
>  replace numtochar(13) with CR in pData
> -- Alex.

More information about the use-livecode mailing list