Unicode button is copied incorrectly

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

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

Unicode button is copied incorrectly

Post by *Flint »

1. Create a buttonbar button that uses Unicode characters somewhere in the path or tooltip.
2. Copy the code of the button to the clipboard (using the right-click menu).
3. Paste the copy of the button to the toolbar.
4. The Unicode characters are pasted as question signs.

I looked into the clipboard contents using CLCL, and saw that the Unicode characters are copied as questions, so the clipboard already contains wrong data.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 10.52 / Win10 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48232
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Indeed this function doesn't currently support Unicode at all. I will consider it if it's not too much work.
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48232
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Sorry, I have to dig out this old report again. Actually TC does support copying of Unicode buttons - the Unicode text is encoded as UTF-8 with BOM. I tried this with Chinese, Russian and Korean text on a Swiss German Windows. I also tried it with Russian locale.

Can you give me an example where it doesn't work, please?
Author of Total Commander
https://www.ghisler.com
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

Post by *Flint »

ghisler(Author)
I have a child toolbar that contains buttons for starting different versions of TC. Extract from it for one of the buttons:

Code: Select all

button11=C:\Program Files\TotalCmd\TOTALCMD64-800β10.exe
cmd11=C:\Program Files\TotalCmd\TOTALCMD64-800β10.exe
iconic11=0
menu11=TotalCmd x64 8.00β10
The BAR file is stored in UTF-16LE with BOM.

I open this bar, right-click the button quoted above, select Copy. In the clipboard the following text appears:

Code: Select all

TOTALCMD#BAR#DATA
C:\Program Files\TotalCmd\TOTALCMD64-800?10.exe

C:\Program Files\TotalCmd\TOTALCMD64-800?10.exe
TotalCmd x64 8.00?10

0
-1
So, instead of Greek "betas" I get question signs.

Windows 7 x64 SP1, Russian locale; TC 8.0β12 x32 and x64.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 10.52 / Win10 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48232
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

The BAR file is stored in UTF-16LE with BOM.
Ah, I guess that this is the problem.
Author of Total Commander
https://www.ghisler.com
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

Post by *Flint »

ghisler(Author)
I see. Indeed, seems to be so. I have now tested with ANSI BAR file and Unicode characters are copied correctly (each line containing Unicode character has UTF-8 BOM signature in the beginning).
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 10.52 / Win10 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48232
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

OK - currently UTF-16 isn't supported for .bar files. Maybe in a future release.
Author of Total Commander
https://www.ghisler.com
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

Post by *Flint »

Confirm fixed in 8.0β14.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 10.52 / Win10 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48232
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Thanks!
Author of Total Commander
https://www.ghisler.com
Post Reply