Page 1 of 1

Right to left text in Compare tool

Posted: 2023-09-10, 21:08 UTC
by browny
TC 11.01 in the current Windows 11 US English.

Two tiny files i1 and i2 are in UTF-8, right to left language, should be in the archive here: cmp.7z (194 bytes).
The second one contains parenthesized text; in Notepad is looks like this: "(xxx) x".
Comparison tool displays text as left to right though this is not a problem yet.
Some editors do the same, show text like "x (xxx)", but after changes and saving it would be correct in Notepad.
The problem is, Comparison tool displays text as "x ((xxx" - different parenthesis in the wrong place.

Re: Right to left text in Compare tool

Posted: 2023-09-11, 10:24 UTC
by ghisler(Author)
Unfortunately right to left text isn't currently supported in the compare tool sorry.

Re: Right to left text in Compare tool

Posted: 2023-09-12, 08:13 UTC
by browny
Is it correct to say that Lister has no right to left text support too?
Sometimes in UTF-8 it displays parenthesized text in left to right order, while other files will have two opening parentheses.

Re: Right to left text in Compare tool

Posted: 2023-09-12, 09:25 UTC
by ghisler(Author)
No, Lister does have right to left text support in text and Unicode UTF-16 and UTF-8 modes. Your files are detected as binary because they don't have any line breaks. Switch to UTF-8 mode manually, then it should work fine.

To switch to right aligned mode, hold down the Ctrl key and press and release the right shift key.
To switch back to left aligned mode, hold down the ctrl key and press and release the left shift key.

Please provide a sample file if you find one which doesn't work.

Re: Right to left text in Compare tool

Posted: 2023-09-12, 21:39 UTC
by browny
lister.7z
Notepad shows all three files with pared parentheses.

ir21 is reasonably good in both left to right and right to left
ir2.b has BOM - also good
ir2.n no BOM - wrong display in left to right "((x"

Possibly text drawing has started as left to right, then switched to the inverse order.

Re: Right to left text in Compare tool

Posted: 2023-09-13, 09:25 UTC
by ghisler(Author)
Interestingly, when you press Ctrl+ right shift, then ir2.n appears just fine. Maybe it's not a TC bug...

Re: Right to left text in Compare tool

Posted: 2023-09-13, 10:40 UTC
by AntonyD
2browny
and which encoding IS a correct one for these files?
IMHO it should be more correctly - if you could supply us with screens of the proper rendering of all of these files.

Re: Right to left text in Compare tool

Posted: 2023-09-13, 11:18 UTC
by browny
ghisler(Author) wrote: 2023-09-13, 09:25 UTC Interestingly, when you press Ctrl+ right shift, then ir2.n appears just fine. Maybe it's not a TC bug...
Notepad made no mistakes.

AntonyD, this is UTF-8 text as written in the opening post.

Re: Right to left text in Compare tool

Posted: 2023-09-13, 11:38 UTC
by AntonyD
this is UTF-8 text
So in this case - all file are opening correctly....
So where is the problem? Maybe screen-shots?
Because mentioned "((x" - I don't see at anywhere(((

Re: Right to left text in Compare tool

Posted: 2023-09-14, 10:31 UTC
by ghisler(Author)
Sorry, I don't know why Lister displays it incorrectly when it's left-aligned. Maybe someone native Arabic has an idea what could be the problem.

Re: Right to left text in Compare tool

Posted: 2023-09-14, 14:24 UTC
by browny
Using an ordinary edit text control and trying to type and copy&paste these characters one by one was a lot of fun.
For those who used to left to right text, arrow keys and backspace move and delete in weird ways.

Re: Right to left text in Compare tool

Posted: 2023-09-15, 14:22 UTC
by browny
Maybe this is the way to write a sequence of characters and ignore the direction of reading.
https://stackoverflow.com/questions/33156889/windows-right-to-left-characters-output-using-textout

Re: Right to left text in Compare tool

Posted: 2023-09-28, 19:46 UTC
by ghisler(Author)

Moderator message

Moved to suggestions forum