[Zope3-dev] OnlineHelpResource

Eckart Hertzler hertzler.eckart at guj.de
Fri Jun 4 04:54:08 EDT 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thank you for pointing this out.

I just committed a fix that determines the file mode based
on the content type.

While looking around I noticed that zope.app.publisher.browser.fileresource
always opens the resources in binary mode.

Eckart



On Thursday 03 June 2004 22:56, Tim Peters is believed to have said:
> I checked in a fix for Windows-specific test failures in
> OnlineHelpResource.__init__(), but while it allows the tests to pass, I
> don't think it solves all the potential problems here.
>
> On Windows, binary files must be opened in binary mode, else you'll read
> mangled data from them.  I changed that in __init__, but I see now that
> OnlineHelpResouce._getData() is still opening files in text mode.
>
> I'm not clear on whether files should *always* be opened in binary mode,
> though.  Best guess is that the open() mode should really be determined by
> the content type (opening a binary file in text mode is a disaster on
> Windows; opening a native text file in binary mode on Windows delivers \r\n
> line ends).
>
>
> _______________________________________________
> Zope3-dev mailing list
> Zope3-dev at zope.org
> Unsub: http://mail.zope.org/mailman/options/zope3-dev/eckart%40hertzler.de

- -- 

Eckart Hertzler

Senior Consultant
G+J Electronic Media Services GmbH
20457 Hamburg
Tel. : +49 40 3703 7591
Fax  : +49 40 3703 - 5792
email: hertzler.eckart at guj.de
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAwDi1xvP4sHhhP/gRAhw1AKCHh4aFMZZ967VDDtZVGiPyzKJGFQCffUHn
e/+iG6S352x5E+EkbEFiaWY=
=JiA6
-----END PGP SIGNATURE-----



More information about the Zope3-dev mailing list