[BUG] Lister: Automatic detection of OEM charset

English support forum

Moderators: Hacker, petermad, Stefan2, white

icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

3 out of 500 of arbitrary OEM files I have tested were reported as ANSI, that's a 99,94% accurary rate. Impressive! :)

Icfu
This account is for sale
xoft
Junior Member
Junior Member
Posts: 15
Joined: 2004-02-27, 18:37 UTC
Location: Praha, CZ
Contact:

Post by *xoft »

How is this bug / feature doing? Is it at least considered? It has been quite bothersome for some time now.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50824
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Unfortunately I haven't yet found a better detection method for plain texts with just a few accented characters, so I have left it as it is for now. :(
Author of Total Commander
https://www.ghisler.com
xoft
Junior Member
Junior Member
Posts: 15
Joined: 2004-02-27, 18:37 UTC
Location: Praha, CZ
Contact:

Post by *xoft »

How so? Alextp has provided a code with quite an impressive accuracy rate.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50824
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Alextp's code is good for finding pseudo-graphics characters only. It cannot be used t distinguish regular texts written with a DOS program from regular Windows texts...
Author of Total Commander
https://www.ghisler.com
xoft
Junior Member
Junior Member
Posts: 15
Joined: 2004-02-27, 18:37 UTC
Location: Praha, CZ
Contact:

Post by *xoft »

I believe it is quite safe to assume that pseudo-graphics characters are the only thing that OEM mode will be used for nowadays - ASCII art. I can't really think of any DOS program that stores text files and is still widely used today.
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

So, because the code cannot detect ALL OEM files, you prefer to keep your own code which cannot detect a SINGLE OEM file correctly.

Not really convincing, especially regarding that plain texts written in DOS editors are way less frequent nowadays than files with pseudo graphics...

Icfu
Last edited by icfu on 2008-09-29, 16:39 UTC, edited 1 time in total.
This account is for sale
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50824
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

No, I just fear the many support mails from users where it _no longer_ works...
Author of Total Commander
https://www.ghisler.com
xoft
Junior Member
Junior Member
Posts: 15
Joined: 2004-02-27, 18:37 UTC
Location: Praha, CZ
Contact:

Post by *xoft »

Easy then - keep the old algorithm but make it available only through settings, with default setting being the new algorithm.
Post Reply