Compare by content default format UTF8

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
jom
Junior Member
Junior Member
Posts: 14
Joined: 2007-06-16, 13:35 UTC

Compare by content default format UTF8

Post by *jom »

I compare UTF8 html files a lot of the time, and TC defaults to ansi format, (probably because there is no UTF-8 BOM signature in my files).

There is a menu to change the compare to UTF-8, but it is very tedious to have to select this option each time I want to compare two files.

Is there a simple option to set the default compare format for when TC does not recognize the file format? So that instead of defaulting to ansi, I could tell it to default to UTF-8 instead? This would save me a lot of time.
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 there is no simple solution. You could use a scripting tool to make this change in the dialog with a single keypress. I'm open to suggestions how to solve this in TC 8.
Author of Total Commander
https://www.ghisler.com
jom
Junior Member
Junior Member
Posts: 14
Joined: 2007-06-16, 13:35 UTC

Post by *jom »

When TC first finds a text file format it doesnt recognize, it defaults to ANSI so I manually change the filetype to UTF8 via the "Choose Encoding" dialog.

A very simple solution is for TC to "remember" this selection in the "Choose Encoding" dialog.

Next time TC finds a text file it doesn't recognize, instead of defaulting to ANSI, it used the option I previously selected in the "Choose Encoding" dialog.

In other words I only need to tell TC once in a session that my files are UTF8, (and not repeatedly every time I compare a new file).

Another solution would be to add a setting to wincmd.ini, for example:
AssumedFileFormatWhenUnrecognised = UTF8

Instead of defaulting to ANSI, it would default to UTF8
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I think better way suggested here: http://www.ghisler.ch/board/viewtopic.php?t=24222
jom
Junior Member
Junior Member
Posts: 14
Joined: 2007-06-16, 13:35 UTC

Post by *jom »

MVV wrote:I think better way suggested here: http://www.ghisler.ch/board/viewtopic.php?t=24222
Sure it would be nice to have better detection too. But what when detection fails? This is what I am talking about.

The procedure for manually selecting encoding format is very tedious, because you have to do it each time for each new file.

This could be improved with a simple mod, so you only have to select the format once, instead of every time.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

jom wrote:Sure it would be nice to have better detection too. But what when detection fails? This is what I am talking about.

The procedure for manually selecting encoding format is very tedious, because you have to do it each time for each new file.
Good UTF-8 detection DLL won't fails if it is written for your codepage. E.g. for Russian letters UTF-8 contains pairs of characters that are impossible in Russian.

TC compare tool allows to select TWO compare encodings - one for each file. So what one should remember TC if they are not the same?
Post Reply