Total Commander Forum Index Total Commander
Forum - Public Discussion and Support
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

UnicodeTest/LockedTest
Goto page 1, 2, 3, 4, 5, 6  Next
 
Post new topic   Reply to topic    Total Commander Forum Index -> Plugins and addons: devel.+support (English) Printable version
View previous topic :: View next topic  
Author Message
Alextp
Power Member
Power Member


Joined: 16 Aug 2004
Posts: 2249
Location: Russian Federation

PostPosted: Sun Jan 15, 2006 6:31 am    Post subject: UnicodeTest/LockedTest Reply with quote

This content plugin allows to check:
1. is filename Unicode or ANSI (on Windows NT/2000/XP systems);
2. is file locked by another task or not.

http://www.totalcmd.net/plugring/UnicodeTest.html
_________________
Universal Viewer - Log Viewer - SynWrite


Last edited by Alextp on Thu Sep 29, 2011 2:23 am; edited 3 times in total
Back to top
View user's profile Send private message Visit poster's website
petermad
Power Member
Power Member


Joined: 05 Feb 2003
Posts: 5355
Location: Valsted, Denmark

PostPosted: Sun Jan 15, 2006 6:47 am    Post subject: Reply with quote

Quote:
BTW, should I put it to Totalcmd.net? IMHO plugin is very small for it.

Of course you should - it is not small for the ones who need it!
_________________
#524
Danish Total Commander Translator
Windows XP Home 32bit SP3 & Windows 7 Home Premium 64bit SP1 and Windows 8. TC 8.01 32 + 64bit

Get Extended Total Commander Menus
Back to top
View user's profile Send private message Send e-mail Visit poster's website
icfu
Power Member
Power Member


Joined: 10 Sep 2003
Posts: 6059

PostPosted: Sun Jan 15, 2006 8:51 am    Post subject: Reply with quote

There is nothing worse than tools and plugins that nobody knows of, so better release everything, no matter how useful or useless it is.
There will always be at least one person who needs it. Smile

Icfu
_________________
This account is for sale
Back to top
View user's profile Send private message Send e-mail
van Dusen
Power Member
Power Member


Joined: 16 Sep 2004
Posts: 653
Location: Sinzig (Rhein), Germany

PostPosted: Sun Jan 15, 2006 2:31 pm    Post subject: Reply with quote

Thanks for this plugin, Alextp!

Could you add a column, which states the character encoding in the follwing manner?

Code:

'Script for Script Content Plugin
'(c)Lev Freidin, 2005

strChrEnc = "ASCII-7"
For i = 1 to Len(filename)
   intZn = AscW(Mid(filename, i ,1))
   If intZn > 255 Then
      strChrEnc = "Unicode"
      Exit For
   ElseIf intZn > 127 Then
      strChrEnc = "ASCII-8"
   Else
      'NOP
   End If
Next

content = strChrEnc


Would be useful in order to check, if problems with some archivers might occur.

Example: The "€"-symbol is ANSI-coded (x'80'), but ZIP will replace this character by "_". Unicode for "€" is x'20AC' (>x'FF'), so result for the new plugin column should be "Unicode" (while existing column reports "ANSI").

Isn't that reliable. Char "ƒ" (ANSI x'83', Unicode x'0192') for instance will result in "Unicode". Bit ZIP handles this char correct, because it is present in westeuropean DOS encoding). I'am afraid, that it would be too much work to recognize, if all characters of a given filename fits a certain encoding / codepage, wouldn't it?

Thanks!
Back to top
View user's profile Send private message Send e-mail
Alextp
Power Member
Power Member


Joined: 16 Aug 2004
Posts: 2249
Location: Russian Federation

PostPosted: Sun Jan 15, 2006 11:51 pm    Post subject: Reply with quote

2van Dusen
Sorry, I didn't understand how function "AscW" works in the script.
AscW(0x80)=0x20AC and
AscW(0x83)=0x0192, right?
How to write this function in Pascal/C?

And, if you want to catch characters in filename that will be replaced by ZIP to '_', you should know, what function ZIP uses for that detection exactly. As you wrote, it's not "AscW(char)>255"...
_________________
Universal Viewer - Log Viewer - SynWrite
Back to top
View user's profile Send private message Visit poster's website
KevinMo
Junior Member
Junior Member


Joined: 26 Mar 2005
Posts: 92

PostPosted: Mon Jan 16, 2006 7:50 am    Post subject: Reply with quote

errr... It shows all folders and filenames in my computer are ANSI (I searched).
So... How to rename them to unicode? I tried use explorer, doesn't work either.
Any tips would be appreciated. Thanks a lot.
Back to top
View user's profile Send private message
CoolWater
Power Member
Power Member


Joined: 27 Mar 2003
Posts: 574

PostPosted: Mon Jan 16, 2006 9:37 am    Post subject: Reply with quote

Alextp wrote:

Sorry, I didn't understand how function "AscW" works in the script.


Small extract from the VB Help file...

Quote:

The AscW function returns the Unicode character code except on platforms where Unicode is not supported, in which case, the behavior is identical to the Asc function.


HTH
CoolWater
Back to top
View user's profile Send private message
Alextp
Power Member
Power Member


Joined: 16 Aug 2004
Posts: 2249
Location: Russian Federation

PostPosted: Mon Jan 16, 2006 11:09 am    Post subject: Reply with quote

2KevinMo
To have Unicode, you must have Win2k/XP, because Unicode API is fully supported only by these OS.

Open Character Map (charmap.exe), select some chars from different encodings (use chars from the end of map) and paste them while renaming file in Explorer - file will be in Unicode. To ensure it's in Unicode, try to open it by F3 - TC must show error: "File not found". If F3 gives no error, then file has accessible short name and TC uses it.

You may need to copy Unicode file to different folder so it will not have accessible short name. E.g. I needed to copy file from C: to D:, so copy will not have short name like source.
_________________
Universal Viewer - Log Viewer - SynWrite


Last edited by Alextp on Mon Jan 16, 2006 11:36 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
Alextp
Power Member
Power Member


Joined: 16 Aug 2004
Posts: 2249
Location: Russian Federation

PostPosted: Mon Jan 16, 2006 11:16 am    Post subject: Reply with quote

2CoolWater
I'll try to read VB help. But I don't think this AscW function will help us. If you want to search for chars that will be renamed by ZIP, you need not AscW, but real functrion used by ZIP (maybe you need to read ZIP source).
_________________
Universal Viewer - Log Viewer - SynWrite
Back to top
View user's profile Send private message Visit poster's website
KevinMo
Junior Member
Junior Member


Joined: 26 Mar 2005
Posts: 92

PostPosted: Mon Jan 16, 2006 12:34 pm    Post subject: Reply with quote

2Alextp
Thanks for your explanation. Seems there would be more trouble using unicode filenames in TC ^_^
Great plugin!
Back to top
View user's profile Send private message
frenky
Senior Member
Senior Member


Joined: 30 Jul 2005
Posts: 249

PostPosted: Mon Jan 16, 2006 2:24 pm    Post subject: Reply with quote

2Alextp
N1 mate!! This one is of real usfe for me.

Now, possible bug Smile

To reproduce you need few files with unicode chars and:
1. Sort by name for reference.
2. Sort by custom column.
3. Move focus from TC, return to TC and list is sorted diferntly...
Image: http://img458.imageshack.us/img458/3619/untitled9wy.jpg

Is sorting of custom coulmns implemented fully at all?
I remember there were some word on the forum about custom columns and sorting, I've tried to find it but...

TC is 6.53.
[Edit]
woops:)
in the image 2. and 3. should be changed Smile
_________________
Ambiguity succeeds where honesty dares not venture.
Back to top
View user's profile Send private message
Alextp
Power Member
Power Member


Joined: 16 Aug 2004
Posts: 2249
Location: Russian Federation

PostPosted: Mon Jan 16, 2006 6:30 pm    Post subject: Reply with quote

Update:
16.01.06: added detection of "Partial Unicode" names

2frenky
It looks like a bug in TC sorting by custom columns. You should show this bug to Ghisler.
_________________
Universal Viewer - Log Viewer - SynWrite
Back to top
View user's profile Send private message Visit poster's website
Alextp
Power Member
Power Member


Joined: 16 Aug 2004
Posts: 2249
Location: Russian Federation

PostPosted: Mon Jan 30, 2006 3:38 am    Post subject: Reply with quote

Update:
30.01.06: added field "Locked test", plugin name changed

Download

Now it's possible to find files by Alt+F7 that are locked by other tasks or TC. Then you may unlock such files using Unlocker (http://ccollomb.free.fr/unlocker).
_________________
Universal Viewer - Log Viewer - SynWrite
Back to top
View user's profile Send private message Visit poster's website
SanskritFritz
Power Member
Power Member


Joined: 24 Jul 2003
Posts: 3701
Location: Budapest, Hungary

PostPosted: Mon Jan 30, 2006 8:21 am    Post subject: Reply with quote

2Alextp
Nice plugin indeed! One small (?) request: another field, that shows the application that locks that particular file! How about that?
_________________
I switched to Linux, bye and thanks for all the fish!
Back to top
View user's profile Send private message Send e-mail
majkinetor !
Power Member
Power Member


Joined: 18 Jan 2006
Posts: 1571

PostPosted: Mon Jan 30, 2006 8:56 am    Post subject: Reply with quote

 
 
 
 
well, THAT would be awesome.



acctualy, don't need 3th field, just put the name of the app in place where you stored "locked" string... live it empty if it is not.


we will search for <> empty string if we want to find only locked files and vice versa if we don't
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Total Commander Forum Index -> Plugins and addons: devel.+support (English) All times are GMT - 6 Hours
Goto page 1, 2, 3, 4, 5, 6  Next
Page 1 of 6

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Impressum: This site is maintained by Ghisler Software GmbH

Using phpBB © 2001-2005 phpBB Group