TC can't handle descript.ion files with lines that end in LF
Moderators: Hacker, petermad, Stefan2, white
-
- Junior Member
- Posts: 22
- Joined: 2003-09-20, 04:30 UTC
TC can't handle descript.ion files with lines that end in LF
Total Commander can't properly handle descript.ion files that have Unix line endings of only a line feed. When copying files with a descript.ion file formatted like that it only appears to copy every other file's comment. When I changed the line endings to CRLF the file comments were copied correctly.
-
- Junior Member
- Posts: 22
- Joined: 2003-09-20, 04:30 UTC
-
- Junior Member
- Posts: 22
- Joined: 2003-09-20, 04:30 UTC
TC can't handle descript.ion files with lines that end in LF
I originally posted this in the wrong forum so now I'm posting it here, in the correct forum. Sorry for my mistake.
Total Commander can't properly handle descript.ion files that have Unix line endings of only a line feed. When copying files with a descript.ion file formatted like that it only appears to copy every other file's comment. When I changed the line endings to CRLF the file comments were copied correctly.
Total Commander can't properly handle descript.ion files that have Unix line endings of only a line feed. When copying files with a descript.ion file formatted like that it only appears to copy every other file's comment. When I changed the line endings to CRLF the file comments were copied correctly.
- ghisler(Author)
- Site Admin
- Posts: 49100
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
The official specs are here:
http://jpsoft.com/ascii/descfile.txt
The specs require <CR>>LF> line endings:
http://jpsoft.com/ascii/descfile.txt
The specs require <CR>>LF> line endings:
I will check how difficult it would be to support Linux or Mac line breaks.Each line is in the following format:
filename.ext Description[*<ID>Other program info]...<CR><LF>
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
-
- Junior Member
- Posts: 22
- Joined: 2003-09-20, 04:30 UTC
From the specs you posted:
"Your program should be able to handle a line terminated by a
CR or LF alone, a CR/LF pair, an EOF (ASCII 26), or the physical end of
the file."
It sounds like even though the specs call for a CRLF ending your program should be able to gracefully handle other line endings.
"Your program should be able to handle a line terminated by a
CR or LF alone, a CR/LF pair, an EOF (ASCII 26), or the physical end of
the file."
It sounds like even though the specs call for a CRLF ending your program should be able to gracefully handle other line endings.
- ghisler(Author)
- Site Admin
- Posts: 49100
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
I checked it - it was indeed a bug: TC can read one comment from such a file, but then reading of comments further down in the file will fail.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com