Fixed - Lister: in Explorer Preview mode the Copy menu copies UTF-8 text as ANSI

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

User avatar
Horst.Epp
Power Member
Power Member
Posts: 6450
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Lister: in Explorer Preview mode the Copy menu copies UTF-8 text as ANSI

Post by *Horst.Epp »

Usher wrote: 2021-04-28, 17:10 UTC
@Horst.Epp
Horst, do you have "Share with" submenu?
Horst.Epp wrote: 2021-04-28, 15:56 UTCThere are preview handlers which have context menu functions like the .eml preview handler but the Microsoft text preview handler has no context menu at all, so you can't copy text from it.
That's your paraphrase of my second suggestion - repeat tests for more specific text files.
Not a "Share with" but "Share"
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
Slavic
Senior Member
Senior Member
Posts: 290
Joined: 2006-02-26, 15:41 UTC
Location: Montenegro

Re: Lister: in Explorer Preview mode the Copy menu copies UTF-8 text as ANSI

Post by *Slavic »

Usher wrote: 2021-04-28, 17:10 UTC That's exactly what I have asked. Now I'd like to see content of 3 submenus…
Open with: Image: https://prnt.sc/127oe5d
Share with: Image: https://prnt.sc/127oehu
Send to: Image: https://prnt.sc/127of16

What next would you like to see?
Desktop: Windows 11 Pro 23H2, TC 11.03(RC). Mobile: Pixel 5a, Android 14, TC 3.42b5
User avatar
Usher
Power Member
Power Member
Posts: 1675
Joined: 2011-03-11, 10:11 UTC

Re: Lister: in Explorer Preview mode the Copy menu copies UTF-8 text as ANSI

Post by *Usher »

2Slavic
What about testing Explorer Preview for other formatted text files (html, css, js, c, cpp, etc.)?
And questions about your screenshots: What is "Text editor"? Can you uninstall it?
Andrzej P. Wozniak
Polish subforum moderator
Slavic
Senior Member
Senior Member
Posts: 290
Joined: 2006-02-26, 15:41 UTC
Location: Montenegro

Re: Lister: in Explorer Preview mode the Copy menu copies UTF-8 text as ANSI

Post by *Slavic »

The text editor is PSPad which I use sometimes for HTML editing. It isn't set as default program for *.txt, *.htm or any other file type, I open it in context menu when need. I can uninstall it, of course, but it isn't installed on my laptop where this bug is reproduced the same way.

testcyr8.htm - save in Notepad as UTF-8

Code: Select all

<html>
<body>
<p>Кириллический текст UTF-8.</p>
</body>
</html>
testcyr8.css

Code: Select all

/* Примечание - Remark */
html, body {color: black; background-color: white;}
The *.css test works quite similar to *.txt, while *.htm has some difference because it's opened in system HTML preview. It has a context menu with Copy and Select all (text preview doesn't have this menu); mouse selection works here too. Unsurprisingly, UTF-8 is copied by handlers perfectly in both cases, unlike a copy via the main Lister menu.

Usher, you should have noticed that I answered almost all your questions. It took a lot of efforts for testing, creating and uploading the screenshots and writing the replies here. But you still haven't performed even the first simple (very simple!) test on your TC, which would take no more than 2-3 min, because of other activities you are busy in... You did not it, as well as Horst.Epp, even though the reproducibility of bugreport by other testers would be very important. Is it fair?
Desktop: Windows 11 Pro 23H2, TC 11.03(RC). Mobile: Pixel 5a, Android 14, TC 3.42b5
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Lister: in Explorer Preview mode the Copy menu copies UTF-8 text as ANSI

Post by *ghisler(Author) »

I found the problem: When you use the menu "Select all", it selects the text representation of the file, not what the preview handler shows. The menu option "Copy to clipboard" then copies that text version.

The solution is to send Ctrl+A/Ctrl+C to the preview handler window via keybd_event (simulated keyboard input).
Author of Total Commander
https://www.ghisler.com
User avatar
Usher
Power Member
Power Member
Posts: 1675
Joined: 2011-03-11, 10:11 UTC

Re: Lister: in Explorer Preview mode the Copy menu copies UTF-8 text as ANSI

Post by *Usher »

Slavic wrote: 2021-04-29, 06:43 UTC Usher, you should have noticed that I answered almost all your questions. It took a lot of efforts for testing, creating and uploading the screenshots and writing the replies here. But you still haven't performed even the first simple (very simple!) test on your TC
I have already written what I can do:
Usher wrote: 2021-04-28, 11:17 UTC I don't use Windows 8.x, so I can only suspect some things.
Explorer Preview in Windows XP is very limited, it doesn't work for txt files (without shell extensions). Currently I have no possibility to test TC in other systems. I was asking in hope that other users could say something more helpful basing on my suggestions.
Andrzej P. Wozniak
Polish subforum moderator
Slavic
Senior Member
Senior Member
Posts: 290
Joined: 2006-02-26, 15:41 UTC
Location: Montenegro

Re: Lister: in Explorer Preview mode the Copy menu copies UTF-8 text as ANSI

Post by *Slavic »

Fixed in beta 8: Lister menu sends Ctrl+A, Ctrl+C to external handler like keyboard commands; the handler works with UTF-8 correctly.
Thanks!

Limitation: it doesn't work for HTML handler (for *.htm files) because that handler doesn't accept keyboard commands. It uses its own context menu instead. As a result, Lister menu commands do nothing, no any bug happens.

=======================
Usher, I understood now the limitation of Windows XP you use, so asking you for testing would have little sense. I didn't perform any tests on XP long ago because I don't have such PC both at home and workplace. Well, testing on XP may be useful in other cases, showing the bugs which don't happen on later systems like my one.
Desktop: Windows 11 Pro 23H2, TC 11.03(RC). Mobile: Pixel 5a, Android 14, TC 3.42b5
Post Reply