Line Endings in diverse Operating Systems

While coding some XML stuff lately (if you’re into PHP and XML, get a grip on FluentDOM if you have not already) I ran about some line ending issues. That [NEL] thingy was new to me, so I just wanted to get the whole picture. There is always something to discover

Line Ending Encodings

Platform Line Ending PHP (UTF-8) Unicode
Apple Macintosh [CR] \r (#x000D)
UNIX Based Systems [LF] \n (#x000A)
DOS Based Systems [CR][LF] \r\n (#x000D)(#x000A)
OS/390 [NEL] \xC2\x85 (#x0085)

Sources: Why CR+LF?, W3C Note

This entry was posted in Hakre's Tips, Pressed and tagged , , , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.