![]() Windows may have issues working with files with unix style line breaks So unix can easily open text-files created in windows (the CR LF essentially becomes CR CR LF). LF always carriage return when advancing the cursor one line down. So rather than use two bytes for every new line in a file (back when you may have been operating from a floppy with only a few KB of space) they decided to have Unix recognized that this combination was very common and lone line feeds are very rare. Hence carriage return (go to the left edge)ĬR feed another line LF makes sense, so CR LF is the most straightforward convention for the common combined operation to go to the left edge of the screen and down one line. Line feeds (LF) feeds more paper to get to the next line, hence moves the cursor vertical down one position. The language comes from common actions of mechanical typewriters that got encoded into the ASCII standard where the 10th ASCII character is LF (\n) (in hexidecimal 0A) and 13th ASCII character is CR (\r) (in hexidecimal 0D).Ĭarriage returns (CR) returns the cursor (carriage) horizontally to the left-most edge of the line. \r = CR = 0x0D (13 in decimal) new line in Mac OSes from the 80s and 90s (e.g., apple II through Mac OS-9) \n = LF = 0x0A (10 in decimal) new line in linux/unix/Mac OS X.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |