Compare Tool: Strg+Cursor is depending on the Encoding

Please report only one bug per message!

Moderators: white, Hacker, petermad, Stefan2

Post Reply
TMg
Junior Member
Junior Member
Posts: 9
Joined: 2011-04-20, 15:20 UTC

Compare Tool: Strg+Cursor is depending on the Encoding

Post by *TMg »

When comparing two text files with "Compare By Content..." I found a Bug: When turning on "Edit mode" and pressing Ctrl+Cursor left and Ctrl+Cursor right the text cursor acts different with UTF-8 encoding and with ANSI encoding. With UTF-8 encoding when pressing Ctrl+Cursor key the text cursor only jumps to the end of words followed by a space. With ANSI encoding the text cursor jumps to the start of words. And it jumps to a lot more boundaries, not only to spaces.

Other programs do this similar to what the compare tool does with ANSI encoding. That's what I expect.

Example:
<example><tag>Example Text Word</tag></example>

Word boundaries with ANSI encoding:
<|example><|tag>|Example |Text |Word</|tag></|example>

Word boundaries with UTF-8 encoding:
<example><tag>Example| Text| Word</tag></example>

Deutsch: Beim "Vergleich nach Inhalt..." von zwei Textdateien fiel mir ein Bug auf: Im Bearbeitungsmodus verhalten sich die Tastenkombinationen Strg+Pfeil links und Strg+Pfeil rechts mit UTF-8-Codierung anders als mit ANSI-Codierung. Mit UTF-8-Codierung springt der Textcursor mit Strg+Pfeiltaste nur an Wortenden direkt vor Leerzeichen. Mit ANSI-Codierung springt der Textcursor an Wortanfänge. Es werden auch wesentlich mehr Stellen angesprungen, nicht nur bei Leerzeichen. Das Verhalten mit ANSI-Codierung ist das, was ich aus anderen Programmen kenne und erwarte.
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

I can confirm this bug.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

This isn't a bug, the two functions are just completely different implementations. The problem with UTF-8 is to correctly detect word separators.
Author of Total Commander
https://www.ghisler.com
TMg
Junior Member
Junior Member
Posts: 9
Joined: 2011-04-20, 15:20 UTC

Post by *TMg »

I know this are different implementations. That's the problem. Both should work the same way. At least for the characters that are the same in both encodings.
#236863
Post Reply