| View previous topic :: View next topic |
| Author |
Message |
Alextp Power Member


Joined: 16 Aug 2004 Posts: 2249 Location: Russian Federation
|
|
| Back to top |
|
 |
petermad Power Member


Joined: 05 Feb 2003 Posts: 5355 Location: Valsted, Denmark
|
Posted: Sun Jan 15, 2006 6:47 am Post subject: |
|
|
| 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 |
|
 |
icfu Power Member

Joined: 10 Sep 2003 Posts: 6059
|
Posted: Sun Jan 15, 2006 8:51 am Post subject: |
|
|
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.
Icfu _________________ This account is for sale |
|
| Back to top |
|
 |
van Dusen Power Member


Joined: 16 Sep 2004 Posts: 653 Location: Sinzig (Rhein), Germany
|
Posted: Sun Jan 15, 2006 2:31 pm Post subject: |
|
|
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 |
|
 |
Alextp Power Member


Joined: 16 Aug 2004 Posts: 2249 Location: Russian Federation
|
Posted: Sun Jan 15, 2006 11:51 pm Post subject: |
|
|
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 |
|
 |
KevinMo Junior Member

Joined: 26 Mar 2005 Posts: 92
|
Posted: Mon Jan 16, 2006 7:50 am Post subject: |
|
|
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 |
|
 |
CoolWater Power Member

Joined: 27 Mar 2003 Posts: 574
|
Posted: Mon Jan 16, 2006 9:37 am Post subject: |
|
|
| 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 |
|
 |
Alextp Power Member


Joined: 16 Aug 2004 Posts: 2249 Location: Russian Federation
|
Posted: Mon Jan 16, 2006 11:09 am Post subject: |
|
|
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 |
|
 |
Alextp Power Member


Joined: 16 Aug 2004 Posts: 2249 Location: Russian Federation
|
Posted: Mon Jan 16, 2006 11:16 am Post subject: |
|
|
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 |
|
 |
KevinMo Junior Member

Joined: 26 Mar 2005 Posts: 92
|
Posted: Mon Jan 16, 2006 12:34 pm Post subject: |
|
|
2Alextp
Thanks for your explanation. Seems there would be more trouble using unicode filenames in TC ^_^
Great plugin! |
|
| Back to top |
|
 |
frenky Senior Member


Joined: 30 Jul 2005 Posts: 249
|
Posted: Mon Jan 16, 2006 2:24 pm Post subject: |
|
|
2Alextp
N1 mate!! This one is of real usfe for me.
Now, possible bug
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  _________________ Ambiguity succeeds where honesty dares not venture. |
|
| Back to top |
|
 |
Alextp Power Member


Joined: 16 Aug 2004 Posts: 2249 Location: Russian Federation
|
Posted: Mon Jan 16, 2006 6:30 pm Post subject: |
|
|
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 |
|
 |
Alextp Power Member


Joined: 16 Aug 2004 Posts: 2249 Location: Russian Federation
|
|
| Back to top |
|
 |
SanskritFritz Power Member


Joined: 24 Jul 2003 Posts: 3701 Location: Budapest, Hungary
|
Posted: Mon Jan 30, 2006 8:21 am Post subject: |
|
|
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 |
|
 |
majkinetor ! Power Member


Joined: 18 Jan 2006 Posts: 1571
|
Posted: Mon Jan 30, 2006 8:56 am Post subject: |
|
|
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 |
|
 |
|