TC7.50pb1: Wr0ng comments shown for Unicode named files

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
fenix_productions
Power Member
Power Member
Posts: 1979
Joined: 2005-08-07, 13:23 UTC
Location: Poland
Contact:

TC7.50pb1: Wr0ng comments shown for Unicode named files

Post by *fenix_productions »

Steps to reproduce:
1. create few folders with Unicode-only names, each name should have the same length (i.e. справ, спрва, псрва);
2. select one of them,
3. go to Files menu and click on Change Attributes,
4. in new dialog click on More attributes and choose:

Code: Select all

Plugin: tc
Property: comment
Value: whatever you like
5. OK
6. from Show menu choose Comments

TC shows same comment to all folders with Unicode names of exact length as the one we wanted to be commented. This happens because each Unicode character is replaced with ? in descript.ion file. Same thing happens for files.

Notes:

Because Unicode support in descript.ion files is rather not possible TC should forbid user to change comments for Unicode-named files via Change attributes dialogue.
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

#128099
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48232
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

This is intentional and will not be changed. The idea is that you can have comments for Unicode files when there are only very few such files. It's better than having no comments at all.
Author of Total Commander
https://www.ghisler.com
User avatar
m^2
Power Member
Power Member
Posts: 1413
Joined: 2006-07-12, 10:02 UTC
Location: Poland
Contact:

Post by *m^2 »

I'm not sure whether it wouldn't be better not to store comments for Unicode files at all.
Think of comments like "expires at ...", "archived" etc.
It's probably a rare case, but unification of several files can lead to data loss.

Anyway, the comments system needs a major update...
User avatar
fenix_productions
Power Member
Power Member
Posts: 1979
Joined: 2005-08-07, 13:23 UTC
Location: Poland
Contact:

Post by *fenix_productions »

2ghisler(Author)
I must agree with m^2: it can lead to problems.
It is also strange that other places forbid commenting of Unicode files.

IMHO assuming that user will have only "few such files" is wrong because this "bug" affects all files/folders with same names length. From this feature point of view they are the same, for user - definitely not.

Also if you have two of such folders and comment one of them but delete second - you've lost it. First, user sees that he has 2 comments instead of 1, next he sees nothing. It will be disturbing in the case of more than 3 items for sure.

So my proposition is to disable it. From my point of view it is better to not have it. Instead of giving the feeling of buggy behaviour.
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

#128099
User avatar
fenix_productions
Power Member
Power Member
Posts: 1979
Joined: 2005-08-07, 13:23 UTC
Location: Poland
Contact:

Post by *fenix_productions »

TC 7.50: problem left exists :( I still think it would be better to disable commenting Unicode named resources completely (even via "Change Attributes" dialogue).
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

#128099
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

I realize their is overhead in keeping descript.ion files compatible with "other programs" - but I doubt I am in the minority when I say, I'm not much concerned about "other programs" ability to read a descript.ion file...

If there was an option for TC to use a functionally equivalent file that was Unicode compliant, it could just be a "descript.utc" or "descript.tcu".
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.
HAL 9000
Senior Member
Senior Member
Posts: 384
Joined: 2007-09-10, 13:05 UTC

Post by *HAL 9000 »

What if the Unicode file names in descript.ion were encoded using UTF-8? That should be somewhat backwards compatible, and would not trip up legacy programs too badly.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48232
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Unfortunately we don't make the standard, so it's not up to us to decide this. :(
Author of Total Commander
https://www.ghisler.com
HAL 9000
Senior Member
Senior Member
Posts: 384
Joined: 2007-09-10, 13:05 UTC

Post by *HAL 9000 »

Does Unicode file names also have a legacy 8.3 short file name?

If so, then use the 8.3 file name in the descript.ion file, and add the Unicode file name in the Ctrl-D section.

This follows the standard as defined here: http://www.jpsoft.com/ascii/descfile.txt

BTW, that document does not mention long file names, or quoting names that contain spaces.
Post Reply