When I write a file using Delphi it's on a Windows machine and the text files it puts out work fine on windows. When I use it on a Mac though it's expecting the formatting to be a bit different. On Mac the newline is different and it can't always read the Windows files.
How can I make my files readable by mac programs?
Description. The term CRLF refers to Carriage Return (ASCII 13, \r ) Line Feed (ASCII 10, \n ). They're used to note the termination of a line, however, dealt with differently in today's popular Operating Systems.
The CRLF abbreviation refers to Carriage Return and Line Feed. CR and LF are special characters (ASCII 13 and 10 respectively, also referred to as \r\n) that are used to signify the End of Line (EOL).
Whereas Windows follows the original convention of a carriage return plus a line feed ( CRLF ) for line endings, operating systems like Linux and Mac use only the line feed ( LF ) character. The history of these two control characters dates back to the era of the typewriter.
(Carriage Return/Line Feed) Two characters that indicate the end-of-line (end-of-paragraph) in Windows and DOS. See line break.
The simple fact is that it is different for all operating systems. There is no "universal" newline. The best you can do is be aware of the differences.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With