Help!! When I using internet transfer control to download a html source file, the downloaded html file have some special end of line characters, how can I handle this?
Printable View
Help!! When I using internet transfer control to download a html source file, the downloaded html file have some special end of line characters, how can I handle this?
That's because there are three possibilites:
The DOS/Win world terminates with CRLF
Unix LF
Apple CR
That's part of why browsers treat EOLs as generic whitespace.
When uploading the files with FTP to convert from your system to the hosts send
as ASCII, or use BINARY to leave it unchanged. The HTTP d/l later is the
equivelant of BINARY mode.
To handle it, d/l to a buffer, copy to a second buffer (or final destination) converting the EOLs to your preferred format, or have a browser display the results.
Or were 0x0D and 0x0A not the special characters?