diff options
author | tetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-10-11 15:08:11 +0000 |
---|---|---|
committer | tetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-10-11 15:08:11 +0000 |
commit | 659fdf41d41a67d86eeaea1b0386aed2363240f5 (patch) | |
tree | 2fd3621fc1c09a88664281ce763be1e1bfdbc166 | |
parent | a02580dd0483e0fec073a1d64634777f47db71bd (diff) |
UTF-8 text output fixes and removing extra newline in disposition-free output
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1742 4979c152-3d1c-0410-bac9-87ea11338e46
-rwxr-xr-x | LedgerSMB/Template.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/LedgerSMB/Template.pm b/LedgerSMB/Template.pm index 59deb5a3..8c302e91 100755 --- a/LedgerSMB/Template.pm +++ b/LedgerSMB/Template.pm @@ -254,19 +254,19 @@ sub _http_output { 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'; } |