作者 | fcamel (飛啊!起舞的小駱駝) | 看板 | P_fcamel |
標題 | [CS] about CR/LF, newline(ENTER? '\n'? '\r'?) |
時間 | Wed Aug 18 18:07:09 2004 |
雖然很多人知道了, 難得看到別人寫好的解釋, 而且還很清楚, 貼一下吧 :p
from:
http://www.w3schools.com/xml/xml_syntax.asp
Do you know what a typewriter is? Well, a typewriter is a mechanical device
used in the previous century to produce printed documents. :-)
After you have typed one line of text on a typewriter, you have to manually
return the printing carriage to the left margin position and manually feed
the paper up one line.
In Windows applications, a new line is normally stored as a pair of cha-
racters:carriage return (CR) and line feed (LF). The character pair bears
some resemblance to the typewriter actions of setting a new line. In Unix
applications, a new line is normally stored as a LF character. Macintosh
applications use only a CR character to store a new line
|