Text

Other areas around text:

OS Differences

Different operating systems handles text files slightly – but in some cases significantly – different.

It may become critical when developing scripts on one platform (e.g. PHP, on Mac) and uploads to a web server running Linux. What works (executes properly) on one platform fails on another.

What differs is how end of line is indicated, what character(s) is/are used – Linefeed (LF, Carriage Return (CR), or both.

System Char Dec Hex Notes CLI
Linux/*NIX
Modern Mac
LF 10 0A Yes
Classic Mac CR 13 0D Got old .mbox files with this No
Windows CRLF 10 13 0D 0A Yes

CLI: if works properly in terminal, command line mode, with std commands, recognizing line breaks.

More info, tips, and techniques in How do I convert between Unix and Mac OS or Mac OS X text files? (opens in a new tab/window), from Indiana Univ., retrieved 2008-03-03).