diff --git a/app/views/projects/blame/show.html.haml b/app/views/projects/blame/show.html.haml
index c507ecf2e4..51a2f20d1e 100644
--- a/app/views/projects/blame/show.html.haml
+++ b/app/views/projects/blame/show.html.haml
@@ -30,5 +30,5 @@
%code
:erb
<% lines.each do |line| %>
- <%= highlight(@blob.name, line, true).html_safe %>
+ <%= highlight(@blob.name, line.force_encoding("utf-8"), true).html_safe %>
<% end %>