changeFilenameCode

Dolphin Service Menus

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

0
Score 50.0%
Description:

Service menu to convert filenames from and to utf-8

***
When you have files named with special characters as é è à ô etc. and a system using utf-8 you may have some problems. Old files created before your utf-8 system or files comming from windows may be encoded using iso-XXX charater set. So they will be badly displayed ! (usualy a square in place of character)
This service menu is designed to repair that by converting your filenames to and from utf-8.

***
Requirement:
- iconv : http://www.gnu.org/software/libiconv/
- bash : http://www.gnu.org/software/bash/

***
Install:
- extract files
- copy the encodeRename.sh bash script somewhere in your PATH
(make sure it is executable)
- copy the changeFilenameCode.desktop to
- ~/.kde/share/apps/konqueror/servicemenus/ for only one user
- /usr/share/apps/konqueror/servicemenus/ (as root) for all users
- edit changeFilenameCode.desktop to set up your code
ie: replace iso-8859-1 which is code for French characters
- restart konqueror

***
Author: JJL
Home Page: http://kubuntu.free.fr/servicemenu/
Last changelog:

14 years ago

0.2 02/11/2005 add french translation
also works for directories (thanks to bobuse)
0.1 23/10/2005 first release

Tadu

13 years ago

Why not use the convmv utility
instead of a hand-grown script
that does only half of the job?
Instead of this script one could
just install convmv and run it
once and be done with it.

-> bad.

Report

bobuse

14 years ago

Hi I've discovered the tool convmv, that do the job of your shell script. This tool could too act recursively :-) I've created another servicemenu : http://www.kde-apps.org/content/show.php?content=31400

Report

nicodietrich

14 years ago

Hi!!

Your tool is nice. I have a suggestion: It would be nice to be able to convert filenames recursively (automatically going into directories).

Ideally that could be done with an extra "-r" option for the encodeRename.sh script. (and is not really needed inside the servicemenu entry).

Thanks!!

Report

C

jjl

14 years ago

Thanks for your comment.
I will look at such an option but this should complicate the script a bit :)
Anyway you could do that with a find command (from iso-8859-1 to utf-8) :
find . -type f -execdir encodeRename.sh iso-8859-1 utf-8 {} \;
(This works only for files)

Report

penturon

14 years ago

Thank's. This is a very useful Service Menu addon.

Report

collinm

14 years ago

add an option to convert the content of the file...

Report

bobuse

14 years ago

Why enable this servicemenu only for files ? Rename directory could be usefull. Just replace all/allfiles by all/all in changeFilenameCode.desktop

Report

C

jjl

14 years ago

Yes, that's a good idea (up to now I've only had the problem on files). I've done new version including directories.
Thanks

Report

bobuse

14 years ago

In addition the script "encodeRename.sh" need a modification. Just before the last instruction (mv), insert "[ -d $old ] && cd .."

Report

zefo

14 years ago

which one? there is more than one (ISO8859-1, ISO8859-2, 3, 4..)

Report

C

jjl

14 years ago

Default value is ISO-8859-1. To change it, juste edit the changeFilenameCode.desktop file and replace iso-8859-1 (on the 2 Exec lines) by your needed code.
You can use any code supported by iconv.

Report

14 years ago

0.2 02/11/2005 add french translation
also works for directories (thanks to bobuse)
0.1 23/10/2005 first release

12345678910
product-maker Base: 4 x 5.0 Ratings
File (click to download) Version Description Downloads Date Filesize DL OCS-Install MD5SUM
*Needs pling-store or ocs-url to install things
Pling
0 Affiliates
Details
license
version
0.2
updated Nov 02 2005
added Oct 23 2005
downloads 24h
0
pageviews 24h 1
System Tags addon