Skip to content

Commit

Permalink
Fixed encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
vti committed Apr 3, 2011
1 parent c0e75cb commit aed27ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/Lamework/Middleware/ViewDisplayer.pm
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ sub _display {

if (Encode::is_utf8($body)) {
$body = Encode::encode('UTF-8', $body);
$content_type .= '; encoding=utf-8';
$content_type .= '; charset=utf-8';
}

return [
Expand Down
2 changes: 1 addition & 1 deletion t/middleware/view_displayer.t
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ $env = {
$res = $middleware->call($env);
is_deeply $res => [
200,
['Content-Length' => 12, 'Content-Type' => 'text/html; encoding=utf-8'],
['Content-Length' => 12, 'Content-Type' => 'text/html; charset=utf-8'],
[Encode::encode_utf8('привет')]
];

0 comments on commit aed27ef

Please sign in to comment.