Tagged articles
2 articles
Page 1 of 1
Liangxu Linux
Liangxu Linux
Mar 31, 2025 · Fundamentals

Why Do Windows and Unix Use Different Line Endings? Understanding \n vs \r

The article explains the historical origins of the carriage‑return (\r) and line‑feed (\n) control characters, their ASCII codes, how various operating systems (Windows, Unix, macOS) represent line endings, the practical impact on file compatibility, and tools for converting between formats.

ASCIIUnixWindows
0 likes · 5 min read
Why Do Windows and Unix Use Different Line Endings? Understanding \n vs \r