Where is the $LANG variable defined?
Emmanuel Seyman
seyman at wanadoo.fr
Sun Nov 7 18:36:02 UTC 2004
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
More information about the fedora-list
mailing list