From 25b7b42c55a868b5460bacfb92fd64056c296f0b Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Fri, 29 Jul 2011 09:09:02 -0700 Subject: [PATCH] Fix for encoding errors on 1.9.2 with the mysql gem --- app/views/repositories/_dir_list_content.rhtml | 2 +- app/views/repositories/_revisions.rhtml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/repositories/_dir_list_content.rhtml b/app/views/repositories/_dir_list_content.rhtml index fd9dd7af..f6833c89 100644 --- a/app/views/repositories/_dir_list_content.rhtml +++ b/app/views/repositories/_dir_list_content.rhtml @@ -22,6 +22,6 @@ <%= link_to_revision(changeset, @project) if changeset %> <%= distance_of_time_in_words(entry.lastrev.time, Time.now) if entry.lastrev && entry.lastrev.time %> <%= changeset.nil? ? h(replace_invalid_utf8(entry.lastrev.author.to_s.split('<').first)) : changeset.author if entry.lastrev %> -<%=h truncate(changeset.comments, :length => 50) unless changeset.nil? %> +<%=h truncate(Changeset.to_utf8(changeset.comments, changeset.repository.repo_log_encoding), :length => 50) unless changeset.nil? %> <% end %> diff --git a/app/views/repositories/_revisions.rhtml b/app/views/repositories/_revisions.rhtml index 92c6fb53..78e0f3b4 100644 --- a/app/views/repositories/_revisions.rhtml +++ b/app/views/repositories/_revisions.rhtml @@ -18,7 +18,7 @@ <%= radio_button_tag('rev_to', changeset.identifier, (line_num==2), :id => "cbto-#{line_num}", :onclick => "if ($('cb-#{line_num}').checked==true) {$('cb-#{line_num-1}').checked=true;}") if show_diff && (line_num > 1) %> <%= format_time(changeset.committed_on) %> <%=h changeset.author %> -<%= textilizable(truncate_at_line_break(changeset.comments)) %> +<%= textilizable(truncate_at_line_break(Changeset.to_utf8(changeset.comments, changeset.repository.repo_log_encoding))) %> <% line_num += 1 %> <% end %>