Skip to content

Commit

Permalink
Improving UTF-8 support for downloaded games.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmacdotorg committed Oct 22, 2016
1 parent 736c9e6 commit 98388b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions IFComp/lib/IFComp/Controller/Play.pm
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ sub download :Chained('fetch_entry') :Args(0) {
my $entry = $c->stash->{ entry };
my $filename = $entry->main_file->basename;
if ( $entry->platform eq 'html' ) {
my $body = $entry->main_file->slurp;
my $body = $entry->main_file->slurp(iomode => '<:encoding(UTF-8)');
$c->res->header( 'Content-Disposition' => "attachment; filename=$filename" );
$c->res->content_type( 'text/html' );
$c->res->content_type( 'text/html; charset=utf-8' );
$c->res->code( 200 );
$c->res->body( $body );
}
Expand Down

0 comments on commit 98388b7

Please sign in to comment.