On 12:04 pm, [email protected] wrote:
I have a system that presents a list of text files for download and
these files are sat on a unix system. Windows uses are complaining
about the EOL of these files, so I was wondering if there was a simple
way to fix it as part of the download.
The files are presented using nevow.static.File(name,
defaultType="text/plain"). Is there a better mime type that will
prompt browsers to convert? Or should I subclass n.s.File to convert
based on browser ID?
As far as I know, browsers don't ever do newline conversion. You'll
need to write some code to do this. Subclassing static.File might be
the way to go.
Please be aware, however, that automatic newline conversion is the cause
of a long list of data-corruption problems with old FTP servers. You
might just want to tell your users to get a text editor that can
understand UNIX newlines.
_______________________________________________
Twisted-web mailing list
[email protected]
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web