• Advertisement
Sign in to follow this  

notepad byte-size question

This topic is 4348 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Why does pressing enter (newline) inside an new empty notepad file consume 2 bytes instead of just one byte, anyone know? Thanks, - xeddiex

Share this post


Link to post
Share on other sites
Advertisement
In Windows, newline is two characters: a carriage return followed by a line feed ("\r\n" in C++).

Share this post


Link to post
Share on other sites
There is some good info here: http://en.wikipedia.org/wiki/Newline

Share this post


Link to post
Share on other sites
For information on the historically reasons read this wikipedia page:

http://en.wikipedia.org/wiki/CRLF

EDIT: 30 seconds too slow! Grrrrr...

here's some info on typewritters instead

http://en.wikipedia.org/wiki/Typewriter

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement