Total Commander Forum Index Total Commander
Forum - Public Discussion and Support
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Lister : Mode detection error…

 
Post new topic   Reply to topic    Total Commander Forum Index -> TC Behaviour which will not be changed Printable version
View previous topic :: View next topic  
Author Message
Clo
Moderator
Moderator


Joined: 02 Dec 2003
Posts: 5737
Location: Bordeaux, France

PostPosted: Sat Sep 12, 2009 9:32 pm    Post subject: Lister : Mode detection error… Reply with quote

Smile Hello !

• A short TXT-ANSI file containing only a few characters is detected as binary, while the automatic detection is set ON :

1. Just type i.e. ejgehaez in any editor, and save the file as i.e. test.txt (ANSI)
2. Ensure you that the automatic detection is ON in the Lister Configuration (first line at the top),
with also the “As configured for the current font” Encoding Menu item checked.
3. View the file in Lister, watch the Options Menu >> Binary is marked ! Razz
- Opening that file in Universal Viewer or Notepad2 shows it as ANSI, of course …

Mr. Green KR
Claude
Clo
_________________
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
fenix_productions
Power Member
Power Member


Joined: 07 Aug 2005
Posts: 1881
Location: Poland

PostPosted: Sun Sep 13, 2009 1:09 am    Post subject: Reply with quote

2Clo
Other forum, thread number 4389.

The answer is:

ghisler(Author) wrote:
Lister expects that there is at least one line break in the file, and no 00 characters (actually 00..05) in the file to be clearly a text file.


So.... this is the question for better "guessing algorithms" Smile
_________________
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

#128099
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Clo
Moderator
Moderator


Joined: 02 Dec 2003
Posts: 5737
Location: Bordeaux, France

PostPosted: Sun Sep 13, 2009 1:53 am    Post subject: Hammer the nail Reply with quote

2fenix_productions

Smile Hello K. !
Quote:
…So.... this is the question for better "guessing algorithms" Smile

• Well, I just hammer the nail… You are right, and in the case, the file isn't empty, same result if a bit longer (10 characters…)
- That doesn't look nice while other viewers¦editors are able to detect TXT-ANSI from a few characters.

Mr. Green KR
Claude
Clo
_________________
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
fenix_productions
Power Member
Power Member


Joined: 07 Aug 2005
Posts: 1881
Location: Poland

PostPosted: Sun Sep 13, 2009 2:37 am    Post subject: Reply with quote

2Clo
I think the problem is in default settings. Other editors start with "text mode" by default and are trying to adapt to it. In the case of lister it may start with "binary" and try to detect other mode to switch to. If it fails we're staying with it.

I agree that current way is not always the best but I am not sure would it be better to have it work other way. We should answer the question is it more likely to have text files or binary ones shorter than one line / amount of bytes read in one go. Answer for such question should determine the way to follow.
_________________
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

#128099
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Total Commander Forum Index -> TC Behaviour which will not be changed All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Impressum: This site is maintained by Ghisler Software GmbH

Using phpBB © 2001-2005 phpBB Group