I program a FTP addon (using python's ftplib) and I wonder what would be the best way to determine, if it should use Binary or ASCII transfer method for a given file. In other words "automatic" transfer mode.
I started looking into this as I got issue report about double lines and googling turned out that binary mode should be responsible [1][2].
It might be using whitelisting or blacklisting extension supposed to be binary or ascii, but it might not be present and of course a question which of the methods (wl x bl,b x a) to use then. It does not sound solid way enough (imperfect list, lack of extension).
-> question: For a given file what's a solid way to choose either binary or ascii transfer mode? (if there is any...)
Thank you
[1] http://www.seo-creative.co.uk/tutorials/ftp-client-giving-you-double-line-breaks/
[2] http://www.chami.com/html-kit/support/docs/pages/h000114.html