[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb: [1742] trunk/LedgerSMB/Template.pm
- Subject: SF.net SVN: ledger-smb: [1742] trunk/LedgerSMB/Template.pm
- From: ..hidden..
- Date: Thu, 11 Oct 2007 08:08:11 -0700
Revision: 1742
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=1742&view=rev
Author: tetragon
Date: 2007-10-11 08:08:11 -0700 (Thu, 11 Oct 2007)
Log Message:
-----------
UTF-8 text output fixes and removing extra newline in disposition-free output
Modified Paths:
--------------
trunk/LedgerSMB/Template.pm
Modified: trunk/LedgerSMB/Template.pm
===================================================================
--- trunk/LedgerSMB/Template.pm 2007-10-11 13:34:46 UTC (rev 1741)
+++ trunk/LedgerSMB/Template.pm 2007-10-11 15:08:11 UTC (rev 1742)
@@ -254,19 +254,19 @@
throw Error::Simple "Invalid format";
}
my $format = "LedgerSMB::Template::$self->{format}";
- my $disposition = "\n";
+ my $disposition = "";
my $name = $format->can('postprocess')->($self);
if ($name) {
$name =~ s#^.*/##;
- $disposition .= qq|Content-Disposition: attachment; filename="$name"|;
+ $disposition .= qq|\nContent-Disposition: attachment; filename="$name"|;
}
if ($self->{mimetype} =~ /^text/) {
print "Content-Type: $self->{mimetype}; charset=utf-8$disposition\n\n";
} else {
print "Content-Type: $self->{mimetype}$disposition\n\n";
+ binmode STDOUT, ':bytes';
}
- binmode STDOUT, ':bytes';
print $data;
binmode STDOUT, ':utf8';
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.