Re: Where is the $LANG variable defined?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Nov 07, 2004 at 03:09:38PM +0100, Björn Persson wrote:
> 
> What do you do when you need to transfer files with non-English 
> filenames (with SCP, SFTP or Rsync)? It's kind of difficult to type the 
> same filename twice on the same command line in two different encodings.

I try to avoid, quite frankly  (probably easier to in Franch than in
other languages).

Until now, I used iconv to translate the filename and rename from
one to the other. Something like (sorry, the real script's at work):

newfname=`echo "$1" | iconv -f UTF-8 -t ISO_8859-15`

if [ $? -ne 0 ]; then
	echo "Error: iconv failed. Skipping."
	exit
fi
mv $1 $newfname

Since then, I've learned of the existence of convmv, which
converts filenames (not file content), directories and filesystems
to diffrent encodings.

http://freshmeat.net/projects/convmv/

Haven't had a chance to give it a whirl but I will this week.

You might also want to check out the GNU recode program:

http://www.gnu.org/software/recode/recode.html

Emmanuel


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux