Skip to main content.
home | support | download

Back to List Archive

Re: prog-woes in windwoes

From: <harmo(at)>
Date: Thu Oct 14 2004 - 06:54:04 GMT
Quoting me:

> I'm trying to use the prog-method, but it seems that my program and
> swish have a different idea of what content-length means
> I suspect something win-specific, maybe something to do with
> linefeeds.

Swish is counting the carriage return+linefeed line-endings in dos-textfiles
as only one character. If I do (in Delphi)
before calculating the length, the indexing works. No matter whether I write
out the original content, or the one converted to unix-linebreaks.

I think that swish is behaving badly here. The stringreplace can be quite
slow, and the behavior is not very logical. And if some of the files were
macintosh-files, a more complicated conversion would be required.

Btw, I dont know how servers and browsers handle linebreaks. If the content
comes from a web-server via http from normal static html-pages, isn't it
delivered as-is? So the problem would be the same on unix-boxes if the
content is spidered stuff originating from dos / mac.
Received on Wed Oct 13 23:54:20 2004