Hello,
I'm replying to this old thread because I believe that my question/commentary
fit here better than in any other thread regarding this subject.
I'm using BackupPC to backup among others a samba file server that uses a
ISO8859-1 charset. To get the characters displayed correctly in the command
line I have to set BackupPC's ClientCharset to ISO-8859-1. That's fine. But
when I try to download a file to a Ubuntu/Windows desktop I've got encoding
problems.
Using the option "-e UTF8" with BackupPC_zipCreate" in the command line works.
But to get it working from the CGI interface I had to "hard coded" it in
lib/BackupPC/CGI/Restore.pm :
------------------------------------------
$bpc->cmdSystemOrEvalLong(["$BinDir/BackupPC_zipCreate",
"-h", $host,
"-n", $num,
"-c", $In{compressLevel},
"-s", $share,
@pathOpts,
@fileList, # add the ,
"-e UTF8" # HERE
],
sub { print(@_); },
-------------------------------------------
I'm sure this is not the best way to do it but I haven't had success with any
other try I did. Does anybody known a better way to do that ?
Thank you,
--
Fernando Laudares Camargos
Révolution Linux
http://www.revolutionlinux.com
---------------------------------------
* Tout opinion et prise de position exprimée dans ce message est celle
de son auteur et pas nécessairement celle de Révolution Linux.
** Any views and opinion presented in this e-mail are solely those of
the author and do not necessarily represent those of Révolution Linux.
Craig Barratt wrote:
> Alexander writes:
>
>>> #------------------------------------------------------------------------
>>> # Version 3.1.0beta0, 3 Sep 2007
>>> #------------------------------------------------------------------------
>>> * Made the default charset for BackupPC_zipCreate cp1252, which
>>> appears to work correctly with WinZip.
>> I think it was not good idea to fix charset. In some countries people
>> using national charsets. For example in Russia we are using cp1251. I
>> believe that $Conf{ClientCharset} is more appropriate (as it was in
>> version 3.0.0.).
>
> The problem is two fold:
>
> - $Conf{ClientCharset} represents what the XferMethod delivers, not
> necessarily what is actually on the clien. For example, smb by
> default it will deliver utf8 encoding, so $Conf{ClientCharset}
> is set to utf8.
>
> - I don't know how charsets work with win zip format files. Is the
> encoding included in the file? Is it just interpreted using the
> local charset when you extract? I don't know. Can anyone help
> here?
>
>> Additionally I found no way to set cp1251 when restore through CGI.
>
> Yes, unfortunately the charset can't be set via CGI.
> You can, however, do it from the command line.
>
> Craig
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> BackupPC-users mailing list
> BackupPC-users AT lists.sourceforge DOT net
> List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
> Wiki: http://backuppc.wiki.sourceforge.net
> Project: http://backuppc.sourceforge.net/
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki: http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/
|