How to use "Compare by contents" highlight effect?

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
sky66
Member
Member
Posts: 176
Joined: 2014-02-22, 08:44 UTC

How to use "Compare by contents" highlight effect?

Post by *sky66 »

I found the picture on TC website, but I don't know how to shown different words highlight effect as below?
http://www.ghisler.com/screenshots/en/07.html

For example this is what I want:
Left: write_header($lang);
Right: write_header($lang_id);

Actual in TC 8.x, it will be hard to find out the difference.
Left: write_header($lang);
Right: write_header($lang_id);
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I made two files with mentioned strings, and TC 8.50 compare tool displayed differences as you want.
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6975
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post by *Horst.Epp »

TC 8.51 b3 displays it just the way you want.
sky66
Member
Member
Posts: 176
Joined: 2014-02-22, 08:44 UTC

Post by *sky66 »

What ?!
I had used this function for long time, and I always get the wrong results due to Notepad default is ANSI.

After test,
1. If Notepad save two files encoding as ANSI,
TC will compare them with ANSI => No good

2. If Notepad save two files encoding as Unicode,
TC will compare them with Unicode (UTF-16) => OK

3. If Notepad save two files encoding as Unicode big endian,
TC will compare them with Unicode MacOS => OK

4. If Notepad save two files encoding as UTF-8,
TC will compare them with UTF-8 => OK

Is this a problem bug? Because I also test the other tool, it can compare them with ANSI and get the correct results.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I tested it with two ANSI files, and all was OK.
And I don't use Notepad, I use comfortable text editor.

Maybe you should upload archive with test files so we would reproduce your behaviour.
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6975
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post by *Horst.Epp »

I tested with ANSI files, result is ok.
As MVV alrady said use one of the many free editors available
all of them are better than Notepad.
sky66
Member
Member
Posts: 176
Joined: 2014-02-22, 08:44 UTC

Post by *sky66 »

:) Notepad is not good enough, but it is my old friend, since 199?

ANSI & UNICODE files as following, write by Notepad, and encode by TC.

ANSI File 1

Code: Select all

MIME-Version: 1.0
Content-Type: application/octet-stream; name="1-1.txt"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="1-1.txt"

d3JpdGVfaGVhZGVyKCRsYW5nX2lkKTsg
ANSI File 2

Code: Select all

MIME-Version: 1.0
Content-Type: application/octet-stream; name="1-2.txt"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="1-2.txt"

d3JpdGVfaGVhZGVyKCRsYW5nKTsg
---------------------------------------------------------

UNICODE File 1

Code: Select all

MIME-Version: 1.0
Content-Type: application/octet-stream; name="2-1.txt"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="2-1.txt"

//53AHIAaQB0AGUAXwBoAGUAYQBkAGUAcgAoACQAbABhAG4AZwBfAGkAZAApADsAIAA=
UNICODE File 2

Code: Select all

MIME-Version: 1.0
Content-Type: application/octet-stream; name="2-2.txt"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="2-2.txt"

//53AHIAaQB0AGUAXwBoAGUAYQBkAGUAcgAoACQAbABhAG4AZwApADsAIAA=
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6975
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post by *Horst.Epp »

sky66 wrote::) Notepad is not good enough, but it is my old friend, since 199?

ANSI & UNICODE files as following, write by Notepad, and encode by TC.

ANSI File 1

Code: Select all

MIME-Version: 1.0
Content-Type: application/octet-stream; name="1-1.txt"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="1-1.txt"

d3JpdGVfaGVhZGVyKCRsYW5nX2lkKTsg
ANSI File 2

Code: Select all

MIME-Version: 1.0
Content-Type: application/octet-stream; name="1-2.txt"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="1-2.txt"

d3JpdGVfaGVhZGVyKCRsYW5nKTsg
---------------------------------------------------------

UNICODE File 1

Code: Select all

MIME-Version: 1.0
Content-Type: application/octet-stream; name="2-1.txt"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="2-1.txt"

//53AHIAaQB0AGUAXwBoAGUAYQBkAGUAcgAoACQAbABhAG4AZwBfAGkAZAApADsAIAA=
UNICODE File 2

Code: Select all

MIME-Version: 1.0
Content-Type: application/octet-stream; name="2-2.txt"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="2-2.txt"

//53AHIAaQB0AGUAXwBoAGUAYQBkAGUAcgAoACQAbABhAG4AZwApADsAIAA=
Both pairs of files compare fine here
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

For me too.

BTW it would be much more convenient to encode one zip archive with all four files (it is irritating to decode 4 files instead of just one).
User avatar
petermad
Power Member
Power Member
Posts: 16032
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

Here the ansi files 1-1.txt and 1-2.txt provided by sky66 compares like this:

Left (1-1.txt): write_header($lang_id);
Right (1-2.txt): write_header($lang);


which is the same as the unicode files - so I cannot confirm the bug.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
sky66
Member
Member
Posts: 176
Joined: 2014-02-22, 08:44 UTC

Post by *sky66 »

After test with different computer & OS. (Update results)

1. English Windows XP + TC 8.5(ENG) compare with ANSI => OK
2. English Windows XP + WCMD 4.0(ENG) compare with default => OK
3. English Windows XP and change "non-Unicode programs" in Control Panel(Regional and Language options) to "Chinese(TW)"+ TC 8.5(ENG) compare with ANSI => NG

4. Chinese Windows XP + TC 8.5(ENG) compare with ANSI => NG
5. Chinese Windows XP + WCMD 4.0(ENG) compare with default => NG
6. Chinese Windows XP and change "non-Unicode programs" in Control Panel to "English(US)"+ TC 8.5(ENG) compare with ANSI => OK

7. Chinese Windows 7 + TC 8.5(ENG) compare with ANSI => NG
8. Chinese Windows 7 + WCMD 4.0(ENG) compare with default => NG
9. Chinese Windows 7 and change "non-Unicode programs" in Control Panel to "English(US)" + TC 8.5(ENG) compare with ANSI => OK

Chinese Windows screen
http://thumbsnap.com/w2VbjC3F

English Windows screen
http://thumbsnap.com/sdvzHXpq
User avatar
petermad
Power Member
Power Member
Posts: 16032
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

3. English Windows XP and change "non-Unicode programs" in Control Panel(Regional and Language options) to "Chinese(TW)"+ TC 8.5(ENG) compare with ANSI => NG
I can confirm this with Danish Windows XP and "Kinesisk "Taiwan" set up for non-unicode programs.

The test file compare like this:

Left (1-1.txt): write_header($lang_id);
Right (1-2.txt): write_header($lang);

I also tried to add a second line to the files to see if it was only present in one line files, but it still compares both lines wrongly.

Apparantly an old bug - testet it with TC 6.54, 7.04 and 8.01 - and they all have it.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50549
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

It's not a bug, TC just doesn't support by character selection in multi-byte languages.
Author of Total Commander
https://www.ghisler.com
Post Reply