X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=blobdiff_plain;f=lib%2FBackupPC%2FCGI%2FBrowse.pm;h=e327b05d2316e1c10275529e215942983911da35;hp=70dd4a1be6d3e12d3ef6eab1437cee1b847c1869;hb=refs%2Ftags%2Fv3_0_0beta1;hpb=a7690ea45972ea3db587bd94fa573edf20d75c91 diff --git a/lib/BackupPC/CGI/Browse.pm b/lib/BackupPC/CGI/Browse.pm index 70dd4a1..e327b05 100644 --- a/lib/BackupPC/CGI/Browse.pm +++ b/lib/BackupPC/CGI/Browse.pm @@ -28,7 +28,7 @@ # #======================================================================== # -# Version 2.1.0_CVS, released 3 Jul 2003. +# Version 3.0.0beta1, released 30 Jul 2006. # # See http://backuppc.sourceforge.net. # @@ -37,6 +37,7 @@ package BackupPC::CGI::Browse; use strict; +use Encode; use BackupPC::CGI::Lib qw(:all); use BackupPC::View; use BackupPC::Attrib qw(:all); @@ -106,6 +107,7 @@ sub action $attr = $view->dirAttrib($num, $share, $relDir); if ( !defined($attr) ) { + $relDir = decode_utf8($relDir); ErrorExit(eval("qq{$Lang->{Can_t_browse_bad_directory_name2}}")); } @@ -156,6 +158,7 @@ sub action } my $dirName = $f; $dirName =~ s/ / /g; + $dirName = decode_utf8($dirName); push(@DirStr, {needTick => 1, tdArgs => " class=\"$tdStyle\"", link => < \n"; } (my $fDisp = "${EscHTML($f)}") =~ s/ / /g; + $fDisp = decode_utf8($fDisp); if ( $gotDir ) { $fileStr .= < @@ -251,7 +255,7 @@ EOF } } $share = $currDir; - my $dirDisplay = "$share/$dir"; + my $dirDisplay = decode_utf8("$share/$dir"); $dirDisplay =~ s{//+}{/}g; $dirDisplay =~ s{/+$}{}g; $dirDisplay = "/" if ( $dirDisplay eq "" ); @@ -297,6 +301,7 @@ EOF } $filledBackup .= eval("qq{$Lang->{Visit_this_directory_in_backup}}"); } + $dir = decode_utf8($dir); my $content = eval("qq{$Lang->{Backup_browse_for__host}}"); Header(eval("qq{$Lang->{Browse_backup__num_for__host}}"), $content); Trailer();