Re: How to get the line break char?
Tiemo, Is the task to compare two CSV files regardless of their line endings? If you don’t care what the line endings are, as Brian points out, using “file:” to read them will convert all line endings to just LF. Then there is no problem comparing, right? .Jerry > On Apr 18, 2018, at 6:52 AM, Brian Milby via use-livecode > wrote: > > One other consideration is how you are opening the file. Using “file” will > end up converting to just LF. You will need to use “binfile” to examine the > line endings native in the file. > On Wed, Apr 18, 2018 at 8:11 AM dunbarx via use-livecode < > use-livecode@lists.runrev.com> wrote: > >> Tiemo. >> >> I guess I do not understand. >> >> put charToNum(the number of chars of line (lineOfInterest + 1) of yourText) >> into tChar >> >> Then tChar can be compared to the "tChar" of any other line. >> >> Craig ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: AW: How to get the line break char?
One other consideration is how you are opening the file. Using “file” will end up converting to just LF. You will need to use “binfile” to examine the line endings native in the file. On Wed, Apr 18, 2018 at 8:11 AM dunbarx via use-livecode < use-livecode@lists.runrev.com> wrote: > Tiemo. > > I guess I do not understand. > > put charToNum(the number of chars of line (lineOfInterest + 1) of yourText) > into tChar > > Then tChar can be compared to the "tChar" of any other line. > > Craig > > > > -- > Sent from: > http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: AW: How to get the line break char?
Tiemo. I guess I do not understand. put charToNum(the number of chars of line (lineOfInterest + 1) of yourText) into tChar Then tChar can be compared to the "tChar" of any other line. Craig -- Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: AW: How to get the line break char?
put the number of chars in line 1 of tVar into temp put char temp+1 of tVar into tLineBreakChar (and beware of single-line data :-) -- Alex. On 18/04/2018 13:57, Tiemo Hollmann TB via use-livecode wrote: Yes, thats what I said. I am looking for an alternative to examine the line break if it is LF, CR, LFCR or whatever Tiemo -Ursprüngliche Nachricht- Von: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] Im Auftrag von dunbarx via use-livecode Gesendet: Mittwoch, 18. April 2018 14:50 An: use-revolut...@lists.runrev.com Cc: dunbarx Betreff: Re: How to get the line break char? Hi. You cannot ask for the "last" char of a line, because LC will give you the last "non-control" char. Say you have the below text in a field: abc def So the last char of line 1 is "c". But the number of chars of that text snippet is 7 But numToChar(char 4 of fld 1) = 10. That is a return char between the "c" and the "d" Craig -- Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
AW: How to get the line break char?
Yes, thats what I said. I am looking for an alternative to examine the line break if it is LF, CR, LFCR or whatever Tiemo -Ursprüngliche Nachricht- Von: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] Im Auftrag von dunbarx via use-livecode Gesendet: Mittwoch, 18. April 2018 14:50 An: use-revolut...@lists.runrev.com Cc: dunbarx Betreff: Re: How to get the line break char? Hi. You cannot ask for the "last" char of a line, because LC will give you the last "non-control" char. Say you have the below text in a field: abc def So the last char of line 1 is "c". But the number of chars of that text snippet is 7 But numToChar(char 4 of fld 1) = 10. That is a return char between the "c" and the "d" Craig -- Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: How to get the line break char?
Hi. You cannot ask for the "last" char of a line, because LC will give you the last "non-control" char. Say you have the below text in a field: abc def So the last char of line 1 is "c". But the number of chars of that text snippet is 7 But numToChar(char 4 of fld 1) = 10. That is a return char between the "c" and the "d" Craig -- Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
How to get the line break char?
Hello, I want to compare two CSV files and I suspect that there is a difference in the kind of line break. With charToNum(last char of line 1 of field "foo") I can compare the last visible char of each line, but how can I get and analyse the line break char that is used? Thanks Tiemo ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode