From: Craig B. <cba...@us...> - 2005-07-12 05:57:50
|
Ludovic Gasc writes: > Hi, I post this message in backuppc-user, and I've need some details of > backuppc source code : > http://sourceforge.net/mailarchive/forum.php?thread_id=7633731&forum_id=503 : > > I"ve an error in filename with special characters when backuppc saves > windows > > computer. > > > > When I connect on console with backuppc user, the "locale" output : > > LANG=fr_FR@euro > > > > When I connect with smbclient on windows computer, the ls output : > > Gestion commercial - Staffsanté D 0 Mon Oct 18 09:55:46 2004 > > Outils du site D 0 Mon Oct 18 15:27:58 2004 > > FAX_Temporaires D 0 Tue Oct 19 12:15:52 2004 > > Eléments Complémentaires D 0 Wed Oct 20 12:38:10 2004 > > > > I"ve you got any idea to resolve this problem ? > > thanks very much > > The distribution of backuppc server is debian sarge. > > I've some new details. The backuppc server is ISO-8859-1, but the saved name > files are encoded with UTF-8. For example on backuppc server : > > phoenix:/var/lib/backuppc/pc/kelhafet/7/fmes_doc/fSTAFFSANTE# ls > attrib fEléments Complémentaires fGestion commercial - > Staffsanté > fCourriers Staffsante fFAX_Temporaires fOutils du site That makes sense. > I supposed that smbclient uses UTF-8 for filename by default when > smbclient is launch without bash. I don't see in smbclient man an > option to choose charset. I believe it's part of smb.conf. See the display|dos|unix charset options. > I try to create a good $LANG with this in config.pl : > $Conf{SmbClientIncrCmd} = '/bin/bash export LANG=fr_FR@euro > /dev/null; > $smbClientPath \\\\$host\\$shareName' > . ' $I_option -U $userName -E -N -d 1' > . ' -c tarmode\\ full -TcN$X_option $timeStampFile - $fileList'; > > But I've this error : > 2005-07-06 18:02:08 Got fatal error during xfer (export: export: No such file > or directory) BackupPC doesn't use a shell to execute commands like $Conf{SmbClientIncrCmd}. You need to put commands like this in a shell script and point $Conf{SmbClientIncrCmd} at your shell script. > How to modify backuppc to use the good charset for files with smb ? As I mentioned in my earlier email, some development is required to make BackupPC handle different charsets correctly. As you are finding out, it also depends upon how each XferMethod handles charsets too. Craig |