How does the software decides if a file is binary or text ?
Moderators: white, Hacker, petermad, Stefan2
-
- New Member
- Posts: 1
- Joined: 2005-12-07, 01:38 UTC
How does the software decides if a file is binary or text ?
I have a file I'm copying from a unix box to a windows one. It's a plain text file with each line 1500 bytes long. For some strange reason, when the file transfer starts (in text mode), I get the message : "Warning. You try to transfer a binary file in text mode." But, the file IS simple text. Basically, it's just a long line full of numbers. My question is then : Based on what criteria does the software issue that warning ?
TC tries to guess by the content of the file (I do not know the exact algorithm). But usuallly it fails rarely.
But anyway, if you know you transfer a textfile you should use the Text-mode (as you already did) and simply ignore this warning.
As you probably know leads transferring a binary file in text mode possibly to a damaged file, because TC 'converts' some chars while transferring (e.g Linfeed+Carriage return to only linefeed vice versa).
sheepdog
But anyway, if you know you transfer a textfile you should use the Text-mode (as you already did) and simply ignore this warning.
As you probably know leads transferring a binary file in text mode possibly to a damaged file, because TC 'converts' some chars while transferring (e.g Linfeed+Carriage return to only linefeed vice versa).
sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
- ghisler(Author)
- Site Admin
- Posts: 48088
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
In fact, TC looks for characters between 0 and 5, which shouldn't occur in normal text files. If you don't want this check, you can disable it with the line
WarnWrongMode=0
in wcx_ftp.ini in section [General].
WarnWrongMode=0
in wcx_ftp.ini in section [General].
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com