What’s the Real Difference Between \n and \r? A Deep Dive into Newline and Carriage Return
This article explains the historical origins, technical meanings, and platform-specific behaviors of the \n (newline) and \r (carriage return) control characters, showing how they affect file formatting across Windows, Unix, and macOS and how to convert between them.
