Not directly on point, but let me ask another question...
When downloading (or uploading I guess, I had not really thought about that yet), I am currently using BINARY mode.
However, some files are "text" files... and some (a lot of?) servers are Unix-based.
If you use ASCII mode from Unix to PC, LF are converted to CRLF, and CRLF are converted to LF when going the other way; at least that's how I understand the difference between ASCII mode and BINARY mode.
So this begs the question: is their any "rule" or other method one may use to determine that any particular file is a "text" file and these conversions should be made? Or do I need to put the onus on the user to tell me?
I'd sure hate to convert LF to CRLF if the file being downloaded is NOT a text file, you know?
At this point I cannot see I can do anything EXCEPT force the user to decide. I allow the user to set up multiple masks for upload/download from any particular server... the screen looks kind of like...
Do I need to add another option column for "CRLF=>LF?" i.e uploading to a 'nix application expecting "text;" which, if true, would make the upload mode ASCII rather than BINARY?
"In context" I am not nuts about asking the user to make another decision; then again, these setups are often done by outside consultants (eg moi) so it might not really be all that confusing.
Comments?
Thanks,
MCM
When downloading (or uploading I guess, I had not really thought about that yet), I am currently using BINARY mode.
However, some files are "text" files... and some (a lot of?) servers are Unix-based.
If you use ASCII mode from Unix to PC, LF are converted to CRLF, and CRLF are converted to LF when going the other way; at least that's how I understand the difference between ASCII mode and BINARY mode.
So this begs the question: is their any "rule" or other method one may use to determine that any particular file is a "text" file and these conversions should be made? Or do I need to put the onus on the user to tell me?
I'd sure hate to convert LF to CRLF if the file being downloaded is NOT a text file, you know?
At this point I cannot see I can do anything EXCEPT force the user to decide. I allow the user to set up multiple masks for upload/download from any particular server... the screen looks kind of like...
Code:
LOCAL FILES UPLOAD AS OVERWRITE? DELETE AFTER? D:\folder\*.* outbound/[FILENAME].[FILEEXT] YES NO C:\folder\*.edi outbound/DATA.[CCYYMMDD].[HHMMSS] NO YES E:\*.dat outbound/DATA_[SERIALNO].DAT YES YES
"In context" I am not nuts about asking the user to make another decision; then again, these setups are often done by outside consultants (eg moi) so it might not really be all that confusing.
Comments?
Thanks,
MCM
Comment