HTML & \r\n

Started by
2 comments, last by cpp forever 18 years, 7 months ago
Me using InternetOpenUrl() & InternetReadFileEx() to open and read html files. But I'm confused about new line symbols, so I don't know how to split string by new lines. What is the standart new line symbol - \r\n, \n, or maybe \r?
ai-blog.org: AI is discussed here.
Advertisement
HTTP RFC says that newline character is \r\n.

Quote:
HTTP/1.1 defines the sequence CR LF as the end-of-line marker for all protocol elements except the entity-body (see appendix 19.3 for tolerant applications). The end-of-line marker within an entity-body is defined by its associated media type, as described in section 3.7.

Oxyd
In HTTP headers: \r\n, as the above poster also said.
In HTML it doesn't matter. In XHTML at least \r\n, \n and \r should all be interpreted as \n (see the XML spec)
Ok. Then I must first split by \r\n. Then by \r and Then by \n. Is this algorithm be ok?
ai-blog.org: AI is discussed here.

This topic is closed to new replies.

Advertisement