New content plugin cputil (chars from different codepage)

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, Hacker, petermad, Stefan2

Postkutscher
Power Member
Power Member
Posts: 556
Joined: 2006-04-01, 00:11 UTC

Post by *Postkutscher »

2ghisler(Author)
Works flawless. Thank you very much!
User avatar
ND
Member
Member
Posts: 150
Joined: 2006-04-10, 16:24 UTC
Location: Sibiu, RO

Post by *ND »

ghisler(Author) wrote:You can either post your additions/corrections here in the forum (which supports Unicode), or send them to me by e-mail in zipped form. Thanks!

Code: Select all

//Romanian (Unicode 3.0, 1999)
î=i
Î=I
â=a
Â=A
ă=a
Ă=A
ș=s
ț=t
Ș=S
Ț=T
//Romanian Legacy (Unicode 1.1, 1993)
ş=s
ţ=t
Ş=S
Ţ=T
aNDreas Bolotă
The truth always carries the ambiguity of the words used to express it. (Frank Herbert, God Emperor of Dune)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Thanks for your list of characters. I just checked it - the following are already handled by Windows itself:
î Î â Â ă Ă
ş ţ Ş Ţ

The following are converted to '_', so I will add them:
ș ț Ș Ț
Author of Total Commander
https://www.ghisler.com
User avatar
ND
Member
Member
Posts: 150
Joined: 2006-04-10, 16:24 UTC
Location: Sibiu, RO

Post by *ND »

ghisler(Author) wrote:Thanks for your list of characters. I just checked it - the following are already handled by Windows itself:
î Î â Â ă Ă
ş ţ Ş Ţ

The following are converted to '_', so I will add them:
ș ț Ș Ț
I was using [face=courier][=cputil.NameReplaceUserUnicode][/face] and [face=courier][=cputil.NameReplaceUserAll][/face] which don't make those replacements, but now I switched to [face=courier][=cputil.NameReplaceNoEnglish][/face] which I think is the one you mean ("handled by Windows itself").
aNDreas Bolotă
The truth always carries the ambiguity of the words used to express it. (Frank Herbert, God Emperor of Dune)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Yes, that's what I meant! The first two do the following:
NameReplaceUserUnicode: Replaces unicode characters from a DIFFERENT codepage only, so that ANSI-only programs like Irfanview can access the files.

NameReplaceUserUnicode: Replaces all characters from other code pages using the external tables only. For example, on a Russian system, only non-cyrillic text is converted to Latin/English.

NameReplaceUserAll: Replaces all characters, also from the same code page, using external tables only.
Author of Total Commander
https://www.ghisler.com
flexscan676
Junior Member
Junior Member
Posts: 6
Joined: 2009-07-13, 06:04 UTC

Post by *flexscan676 »

I just posted a new topic on this matter, but I think the issue is covered by this topic already, sorry !

I read the posts in this topic, but one thing I do not understand is if the file name contains e.g. 'ä', why is it converted to a simple 'a' ?
Why is it not possible to just keep the 'ä' ?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

It depends on which of the options you use, and which language settings. If you choose to replace only Unicode characters, and are using German or French settings where the 'ä' is part of the language, then the 'ä' will not be changed to 'a'. If you use e.g. Russian locale, then 'ä' isn't part of the current codepage and will be changed.
Author of Total Commander
https://www.ghisler.com
flexscan676
Junior Member
Junior Member
Posts: 6
Joined: 2009-07-13, 06:04 UTC

Post by *flexscan676 »

Understood, yet it is rather annoying to have to care about code pages and the like in a program such as TC.
As suggested by "theosdikaios" in a related post, I downloaded and updated to v7.5beta7
WORKS !
Thx for the long-awaited implementation of UNICODE in the program !
antivari
Junior Member
Junior Member
Posts: 3
Joined: 2009-09-04, 19:57 UTC
Location: Serbia
Contact:

Post by *antivari »

Hi,

This is a small contribution to complete "cputil1.tbl" conversion table for Serbian Cyrillic.

As I can see, the basis for conversion table for Cyrillic alphabet is taken from Russian language.

In Serbian, compared with Russian, there are many shared Cyrillic letters, and even few more. (Some letters exists only in Russian, but that's not relevant for now).

The existing conversion table for Cyrillic alphabet is following the 'phonetic' logic for conversion.

In fact, this is not the ideal solution for Serbian because of readability after conversion.

That's because in Serbia both Latin and Cyrillic alphabets are used concurrently, and there is internal conversion table, and key part of it is presented below.

In such scenario, the best readability would be achieved with cropped Latin replacement (eliminated diacritical marks from Latin).

I'm aware that two different semantics would be overkill, so I just present the table of missing letters to complete the Serbian Latin alphabet.

Anyway, this is great plug-in (because of problems with packers and burners), and whatever Christian Ghisler decides to include in final plug-in - it would be OK.


Uppercase/Lowercase conversion table for Serbian Cyrillic:

Already included in "cputil1.tbl":
(cyrillic) Ж == (latin) Ž == (phonetic) ZH == (cropped latin) Z
(cyrillic) ж == (latin) ž == (phonetic) zh == (cropped latin) z
(cyrillic) Ш == (latin) Š == (phonetic) SH == (cropped latin) S
(cyrillic) ш == (latin) š == (phonetic) sh == (cropped latin) s
(cyrillic) Ч == (latin) Č == (phonetic) CH == (cropped latin) C
(cyrillic) ч == (latin) č == (phonetic) ch == (cropped latin) c

Does not exist in "cputil1.tbl":
(cyrillic) Ђ == (latin) Đ == (phonetic) DJ == (cropped latin) DJ
(cyrillic) ђ == (latin) đ == (phonetic) dj == (cropped latin) dj
(cyrillic) Ћ == (latin) Ć == (phonetic) TJ == (cropped latin) C
(cyrillic) ћ == (latin) ć == (phonetic) tj == (cropped latin) c
(cyrillic) Џ == (latin) DŽ == (phonetic) DZH == (cropped latin) DZ
(cyrillic) џ == (latin) dž == (phonetic) dzh == (cropped latin) dz
(cyrillic) Љ == (latin) LJ == (phonetic) LJ == (cropped latin) LJ
(cyrillic) љ == (latin) lj == (phonetic) lj == (cropped latin) lj
(cyrillic) Њ == (latin) NJ == (phonetic) NJ == (cropped latin) NJ
(cyrillic) њ == (latin) nj == (phonetic) nj == (cropped latin) nj
(cyrillic) Ј == (latin) J == (phonetic) J == (cropped latin) J
(cyrillic) ј == (latin) j == (phonetic) j == (cropped latin) j

(I'm not sure why letter "J/j" is omitted from previous conversion table, but it's needed to avoid underscores after conversion)



Best regards,
Vladimir Stefanovic
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Thanks very much!
Maybe you could send me two separate cputil.tbl by e-mail?
1. One which can be used as a replacement for the current included file, which keeps the Russian characters and adds Serbian
2. One which I could offer as a separate download which would be optimized for Serbian?

Please send them to beta at ghisler dot com. Thanks!
Author of Total Commander
https://www.ghisler.com
antivari
Junior Member
Junior Member
Posts: 3
Joined: 2009-09-04, 19:57 UTC
Location: Serbia
Contact:

Post by *antivari »

Ok.
antivari
Junior Member
Junior Member
Posts: 3
Joined: 2009-09-04, 19:57 UTC
Location: Serbia
Contact:

Post by *antivari »

@Ghisler
I've sent you email with attachment(s).



Best Regards,
Vladimir Stefanovic
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Thanks very much!
Author of Total Commander
https://www.ghisler.com
bejoscha
Junior Member
Junior Member
Posts: 3
Joined: 2009-09-12, 09:24 UTC

Post by *bejoscha »

Thanks a lot for this plugin which seems to be exactly what I am looking for. (I need to automatically "translate" 50000+ filenames in a branched folder-structure of several hundreths of folders, as one of my programs can not read those files.)
Now, as I am completely new to TotalCommander, can anybody please give a short "for-dummies" description on how I would install/use this plugin to rename all files in a folderstructure? (replacing "unreadable" codepage letters by (any, in my case) readable latin ones?)
User avatar
ts4242
Power Member
Power Member
Posts: 2081
Joined: 2004-02-02, 20:08 UTC
Contact:

Post by *ts4242 »

2bejoscha

1. Download and install the plugin.
2. In the left panel go to the root folder of your files.
3. Press <Ctrl+B> for branch view.
4. Press <Ctrl+A> to select all files.
5. Press <Ctrl+M> to start multi rename tool.
6. In the "Rename mask:" field type [=cputil.NameReplaceUserAll]
7. Press start button.
Post Reply