Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) Standard preamble: ========================================================================
NAMEconvmv - converts filenames from one encoding to another
- -f ENCODING
- specify the current encoding of the filename(s) from which should be converted
- -t ENCODING
- specify the encoding to which the filename(s) should be converted
- interactive mode (ask y/n for each action)
- recursively go through directories
target files will be normalization form C for UTF-8(Linux etc.)
target files will be normalization form D for UTF-8(OS Xetc.).
- --qfrom , --qto
- be more quiet about the ``from'' or ``to'' of a rename (if it screws up your terminal e.g.). This will in fact do nothing else than replace any non-ASCII character (bytewise) with ? and any control character with * on printout, this does not affect rename operation itself.
- --exec command
execute the given command. You have to quote the command and #1 will be
substituted by the old, #2 by the new filename. Using this option link
targets will stay untouched.
convmv -f latin1 -t utf-8 -r --exec ``echo #1 should be renamed to #2'' path/to/files
list all available encodings. To get support for more Chinese or Japanese
encodings install the Perl HanExtra or JIS2KEncode packages.
- keep memory footprint low by not creating a hash of all files. This disables checking if symlink targets are in subtree. Symlink target pointers will be converted regardlessly. If you convert multiple hundredthousands or millions of files the memory usage of convmv might grow quite high. This option would help you out in that case.
by default convmv will detect if a filename is already UTF8encoded and will skip this file if conversion from some charset toUTF8should be performed. "--nosmart" will also force conversion toUTF-8for such files, which might result in ``double encodedUTF-8''(see section below).
using the "--fixdouble" option convmv does only convert files which will still
be UTF-8encoded after conversion. That's useful for fixing double-encodedUTF-8files. All files which are notUTF-8or will not result inUTF-8after conversion will not be touched. Also see chapter ``How to undo doubleUTF-8 ...''below.
- Needed to actually rename the files. By default convmv will just print what it wants to do.
This is an advanced option that people who want to write a GUIfront end will find useful (some others maybe, too). It will convmv make print out what it would do in an easy parsable way. The first column contains the action or some kind of information, the second column mostly contains the file that is to be modified and if appropriate the third column contains the modified value. Each column is separated by \0\n (nullbyte newline). Each row (one action) is separated by \0\0\n (nullbyte nullbyte newline).
- modifying filenames usually causes the parent directory's mtime being updated. Since version 2 convmv by default resets the mtime to the old value. If your filesystem supports sub-second resolution the sub-second part of the atime and mtime will be lost as Perl does not yet support that. With this option you can disable the preservation of the mtimes.
- if the file to which shall be renamed already exists, it will be overwritten if the other file content is equal.
- this option will remove this ugly % hex sequences from filenames and turn them into (hopefully) nicer 8-bit characters. After --unescape you might want to do a charset conversion. This sequences like %20 etc. are sometimes produced when downloading via http or ftp.
- --upper , --lower
- turn filenames into all upper or all lower case. When the file is not ASCII-encoded, convmv expects a charset to be entered via the -f switch.
apply some custom character mappings, currently supported are:
ntfs-sfm(-undo), ntfs-sfu(-undo) for the mapping of illegal ntfs characters for Linux or Macintosh cifs clients (seeMS KB 117258also mapchars mount option of mount.cifs on Linux).
ntfs-pretty(-undo) for for the mapping of illegal ntfs characters to pretty legal Japanese versions of them.
See the map_get_newname() function how to easily add own mappings if needed. Let me know if you think convmv is missing some useful mapping here.
care about the dotless i/I issue. A lowercase version of ``I'' will also be
dotless while an uppercase version of ``i'' will also be dotted. This is an
issue for Turkish and Azeri.
By the way: The superscript dot of the letter i was added in the Middle Ages to distinguish the letter (in manuscripts) from adjacent vertical strokes in such letters as u, m, and n. J is a variant form of i which emerged at this time and subsequently became a separate letter.
- print a short summary of available options
- print a list of all available options
DESCRIPTIONconvmv is meant to help convert a single filename, a directory tree and the contained files or a whole filesystem into a different encoding. It just converts the filenames, not the content of the files. A special feature of convmv is that it also takes care of symlinks, also converts the symlink target pointer in case the symlink target is being converted, too.
All this comes in very handy when one wants to switch over from old 8-bit locales to
Filesystem issuesAlmost all
Linux and (most?) other Unix-like operating systems use the so called normalization form C (
If people mount
How to undo double UTF-8 (or other) encoded filenames
Sometimes it might happen that you ``double-encoded'' certain filenames, for
example the file names already were
How to repair Samba filesWhen in the smb.conf (of Samba 2.x) there hasn't been set a correct ``character set'' variable, files which are created from Win* clients are being created in the client's codepage, e.g. cp850 for western european languages. As a result of that the files which contain non-ASCII characters are screwed up if you ``ls'' them on the Unix server. If you change the ``character set'' variable afterwards to iso8859-1, newly created files are okay, but the old files are still screwed up in the Windows encoding. In this case convmv can also be used to convert the old Samba-shared files from cp850 to iso8859-1.
By the way: Samba 3.x finally maps to
Netatalk interoperability issuesWhen Netatalk is being switched to
SEE ALSOlocale(1) utf-8(7) charsets(7)
BUGSno bugs or fleas known
DONATEYou can support convmv by doing a donation, see <www.j3e.de/donate.html>
Send mail to bjoern [at] j3e.de for bug reports and suggestions.