Inplace rename with Chinese filename

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

Raymond
Senior Member
Senior Member
Posts: 454
Joined: 2003-02-08, 15:43 UTC

Inplace rename with Chinese filename

Post by *Raymond »

Please see this screenshoot.
I set RenameSelOnlyName=1 in wincmd.ini. The screenshot shows when I press SHIFT+F6, and again, and again.
You can see the first one is right. Thereafter it messes up.
It only happens with Chinese filename. With english files it is ok of course.
It's not even a new bug since v7. It's been existing for a long time.
Not a big deal to me though, but Christian, could you fix it in the coming great v7 final?
:)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I'm sorry but I couldn't reproduce this error with my multi-lingual and English versions of Windows 2000 and XP. It must be a bug specific to the Chinese version of Windows.
Author of Total Commander
https://www.ghisler.com
Raymond
Senior Member
Senior Member
Posts: 454
Joined: 2003-02-08, 15:43 UTC

Post by *Raymond »

My system is win2000 pro english version. "Language settings for the system" chooses Simplified Chinese as default (like all Chinese users will do).

I've been asking around among Chinese TC users. Out of 35 answers so far, 18 of them claim the same problem, the rest not. It happens on win2000, winxp and win2003. Typically among 21 winxp chinese version users, 11 of them claim the problem, the rest are ok.

Things are getting complicated...but you can see, the prolbem is indeed out there.
cheming
Member
Member
Posts: 153
Joined: 2004-05-07, 14:38 UTC
Location: China

Post by *cheming »

Raymond
Senior Member
Senior Member
Posts: 454
Joined: 2003-02-08, 15:43 UTC

Post by *Raymond »

Turn out it's a program Filebox Extender causes my problem. TC works ok without it.
Another program DM2 causes somebody the same problem too.
Maybe others got this problem with who-knows-what programs.
I don't know what to say now.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

The problem was not solved in that thread. :(

2Raymond
Any ideas of what is different between the systems where it works correctly and where it doesn't? It would be simple to use bytes in one case and characters in the other, but I have to know when to use which to get the right display!
Author of Total Commander
https://www.ghisler.com
Raymond
Senior Member
Senior Member
Posts: 454
Joined: 2003-02-08, 15:43 UTC

Post by *Raymond »

2Christian
What do you mean by "use bytes in one case and characters in the other" (sorry for my english)? Could you explain a little more what I can do? Hope I could help.
dodowolf
Junior Member
Junior Member
Posts: 2
Joined: 2006-11-06, 16:58 UTC

Post by *dodowolf »

My system has the same symptom as Raymond stated. I am using a fresh installation of Windows XP Sp2 with non-unicode set to Chinese(PRC). I do not have DM or FB installed on my machine.

2Ghislter do you mind explain a bit what system is currently used? The byte code of "." or character? What I suspect is that certain Chinese Characters contains the byte code of "."

BTW, is that an account purge sometime ago? My old account exists no longer.. :(
cheming
Member
Member
Posts: 153
Joined: 2004-05-07, 14:38 UTC
Location: China

Post by *cheming »

ghisler(Author) wrote:The problem was not solved in that thread. :(

2Raymond
Any ideas of what is different between the systems where it works correctly and where it doesn't? It would be simple to use bytes in one case and characters in the other, but I have to know when to use which to get the right display!
2cheming
Yes, Total Commander uses EM_SETSEL to set the selection length. However, it uses CharNext() to count the number of characters in the string. Actually this seems to be a bug in Windows XP that EM_SETSEL works differently than in all other Windows versions - EM_SETSEL seems to select bytes on XP, while it selects characters on all other windows versions.

I will try to solve it like this:
1. Select entire field
2. Check how long the selection is via EM_GETSEL
3. Depending on the return value, use the one or other length for EM_SETSEL
I think you would try that workround.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I think that I did, but I don't remember why it didn't work. I will try again.
Author of Total Commander
https://www.ghisler.com
Raymond
Senior Member
Senior Member
Posts: 454
Joined: 2003-02-08, 15:43 UTC

Post by *Raymond »

I tried cycle selection with v7 beta 2, when Filebox Extender is running, with Chinese filename of course.
Shift+F6 ok
Shift+F5 not ok
F5 not ok
F6 not ok
Alt+F5 ok

Also tested it with DM2, the result is the same.
User avatar
zhv
Junior Member
Junior Member
Posts: 76
Joined: 2006-03-11, 14:54 UTC

Post by *zhv »

Raymond wrote:I tried cycle selection with v7 beta 2, when Filebox Extender is running, with Chinese filename of course.
Shift+F6 ok
Shift+F5 not ok
F5 not ok
F6 not ok
Alt+F5 ok

Also tested it with DM2, the result is the same.
In my case:
Shift+F6 ok
Shift+F5 ok
F5 ok
F6 ok
Alt+F5 Doesn't Work

Stange...

OS:XP Home, SP1, CHS
Raymond
Senior Member
Senior Member
Posts: 454
Joined: 2003-02-08, 15:43 UTC

Post by *Raymond »

2zhv
You tested it with DM2 running, right?
User avatar
zhv
Junior Member
Junior Member
Posts: 76
Joined: 2006-03-11, 14:54 UTC

Post by *zhv »

Raymond wrote:2zhv
You tested it with DM2 running, right?
I tested it with DM2 and FileBX respectively.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I have changed this function only in Shift+F6 inplace rename. Can you confirm that everything is OK with Shift+F6 now? If yes, I will try to add these changes also to the F5 copy dialog.
Author of Total Commander
https://www.ghisler.com
Post Reply