New line characters for Multi-line data (CR, LF, or Both)

Kind of related to my earlier post, but with a broader scope.

Is there a preference for characters used for multi-line data?
CR(0x0D, “\r”), LF(0x0A, “\n”), CRLF(0x0D0x0a, “\r\n”), or LFCR(0x0A0x0D, “\n\r”)

And does this vary with context?
DB data(differ for Progress or SQL?), UI display (differ for textbox or grid?), SSRS Reports, Crystal Reports, Matching in BAQ’s, etc…

My text editor has the ability to select the line endings and the options are:
image

Standard Windows is Chr(13) and Chr(10) (CR + LF)

So … I should always use CR+LF???

I could assume that SQL DB and SSRS are “Windows”, and that the client program of E10 is “Windows”. Crystal Reports? Client program viewed as a Webpage?

CR+LF is generally the safest bet. IMO

2 Likes

CRLF is also called a “network newline.” Windows, Unix, and Mac should all use CRLF for data that is exchanged between systems.