https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292017-05-15T10:29:01ZRedmineRedmine - Defect #25846: Repository directory listing: ActionView::Template::Error (incompatible character encodings: ASCII-8BIT and UTF-8)https://www.redmine.org/issues/25846?journal_id=785492017-05-15T10:29:01ZToshi MARUYAMA
<ul><li><strong>File</strong> <a href="/attachments/18312">2.png</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/18312/2.png">2.png</a> added</li><li><strong>File</strong> <a href="/attachments/18313">1.png</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/18313/1.png">1.png</a> added</li><li><strong>Status</strong> changed from <i>New</i> to <i>Needs feedback</i></li></ul><p>I cannot reproduce.</p>
<p><img src="https://www.redmine.org/attachments/download/18313/1.png" alt="" /><br /><img src="https://www.redmine.org/attachments/download/18312/2.png" alt="" /></p>
<pre>
$ rpm -q git
git-1.8.3.1-6.el7_2.1.x86_64
</pre> Redmine - Defect #25846: Repository directory listing: ActionView::Template::Error (incompatible character encodings: ASCII-8BIT and UTF-8)https://www.redmine.org/issues/25846?journal_id=785502017-05-15T11:57:27ZMarc Vollmer
<ul></ul><p>We have multiple repositories (4 configured) 3 work 1 not, as stated it's definitely not the ~ because it's been there for too long and theres also one working repository that also has a ~ in a file name.</p>
<p>We checked all files and directories against the following regex and they all match: ^[a-zA-Z0-9._\-$ ~]+$<br />So no files with unusual chars in the name.</p>
<p>As a reference the git version:</p>
<pre>
# zypper if git-core
Refreshing service 'SUSE_Linux_Enterprise_Server_12_SP2_x86_64'.
Refreshing service 'SUSE_Linux_Enterprise_Software_Development_Kit_12_SP2_x86_64'.
Loading repository data...
Reading installed packages...
Information for package git-core:
---------------------------------
Repository : SLES12-SP2-Updates
Name : git-core
Version : 2.12.0-23.1
Arch : x86_64
Vendor : SUSE LLC <https://www.suse.com/>
Support Level : Level 3
Installed Size : 29.5 MiB
Installed : Yes
Status : out-of-date (version 1.8.5.6-18.1 installed)
Summary : Core git tools
Description :
Git is a fast, scalable, distributed revision control system with an
unusually rich command set that provides both high-level operations and
full access to internals.
These are the core tools with minimal dependencies.
</pre>
<p>Commits with Ticket ID's are referenced in tickets, so scanning also works.</p> Redmine - Defect #25846: Repository directory listing: ActionView::Template::Error (incompatible character encodings: ASCII-8BIT and UTF-8)https://www.redmine.org/issues/25846?journal_id=814242017-10-05T15:23:57ZLuc Lalonde
<ul></ul><p>We're also seeing this error:</p>
<pre>
ActionView::Template::Error (incompatible character encodings: ASCII-8BIT and UTF-8):
27: :id => 'tag' %>
28: <% end -%>
29:
30: <% if @repository.supports_all_revisions? %>
31: | <%= l(:label_revision) %>:
32: <%= text_field_tag 'rev', @rev, :size => 8 %>
33: <% end %>
app/views/repositories/_navigation.html.erb:30:in `block in _app_views_repositories__navigation_html_erb__965151315351232331_69898529566340'
app/views/repositories/_navigation.html.erb:9:in `_app_views_repositories__navigation_html_erb__965151315351232331_69898529566340'
app/views/repositories/show.html.erb:4:in `_app_views_repositories_show_html_erb___2125122647801616403_69898529468540'
app/controllers/repositories_controller.rb:125:in `show'
lib/redmine/sudo_mode.rb:63:in `sudo_mode'
</pre>
<p>This patch solves the problem:</p>
<pre>
[root@githost adapters]# pwd
/var/www/redmine/lib/redmine/scm/adapters
[root@githost adapters]# diff git_adapter.rb git_adapter.rb.bak2017-10-05
89d88
< bran.force_encoding("UTF-8") if bran.respond_to?(:force_encoding)
103,108c102
< # @tags = io.readlines.sort!.map{|t| t.strip}
< @tags = io.readlines.sort!.map do |tag|
< tag = tag.strip
< tag.force_encoding("UTF-8") if tag.respond_to?(:force_encoding)
< tag
< end
---
> @tags = io.readlines.sort!.map{|t| t.strip}
</pre>
<p>Here's the link for the original reference:</p>
<p><a class="external" href="https://stackoverflow.com/questions/42804760/error-in-repository-view-redmin-actionviewtemplateerror-incompatible-charac">https://stackoverflow.com/questions/42804760/error-in-repository-view-redmin-actionviewtemplateerror-incompatible-charac</a></p>
<p>Hope this can lea</p> Redmine - Defect #25846: Repository directory listing: ActionView::Template::Error (incompatible character encodings: ASCII-8BIT and UTF-8)https://www.redmine.org/issues/25846?journal_id=814252017-10-05T15:25:17ZLuc Lalonde
<ul></ul><p>Forgot these details:</p>
<pre>
Environment:
Redmine version 3.3.3.stable
Ruby version 2.3.1-p112 (2016-04-26) [x86_64-linux]
Rails version 4.2.7.1
Environment production
Database adapter Mysql2
SCM:
Subversion 1.7.14
Git 1.8.3.1
Filesystem
Redmine plugins:
redmine_ldap_sync 2.0.8.devel.gf916e6574e
timesheet 0.7.0
</pre> Redmine - Defect #25846: Repository directory listing: ActionView::Template::Error (incompatible character encodings: ASCII-8BIT and UTF-8)https://www.redmine.org/issues/25846?journal_id=832182018-01-18T13:33:56Zleonid terekhov
<ul></ul><p>Luc Lalonde wrote:</p>
<blockquote>
<p>We're also seeing this error:</p>
<p>[...]</p>
<p>This patch solves the problem:</p>
<p>[...]</p>
<p>Here's the link for the original reference:</p>
<p><a class="external" href="https://stackoverflow.com/questions/42804760/error-in-repository-view-redmin-actionviewtemplateerror-incompatible-charac">https://stackoverflow.com/questions/42804760/error-in-repository-view-redmin-actionviewtemplateerror-incompatible-charac</a></p>
<p>Hope this can lea</p>
</blockquote>
<p>Thank you! It works for me.</p> Redmine - Defect #25846: Repository directory listing: ActionView::Template::Error (incompatible character encodings: ASCII-8BIT and UTF-8)https://www.redmine.org/issues/25846?journal_id=867052018-08-21T07:09:15ZJan Hohmann
<ul></ul><p>We have the same problem.</p>
<p>Can this fix please be merged into the next release?</p>
<p>Affected Version: 3.4.5</p> Redmine - Defect #25846: Repository directory listing: ActionView::Template::Error (incompatible character encodings: ASCII-8BIT and UTF-8)https://www.redmine.org/issues/25846?journal_id=933652019-08-28T10:57:28ZS. Ruttloff
<ul></ul><p>We had the same problem with Redmine 3.3.1 and could fix it with the patch.</p>
<p>Thanks</p> Redmine - Defect #25846: Repository directory listing: ActionView::Template::Error (incompatible character encodings: ASCII-8BIT and UTF-8)https://www.redmine.org/issues/25846?journal_id=964512020-02-27T16:57:21ZToshi MARUYAMA
<ul><li><strong>Status</strong> changed from <i>Needs feedback</i> to <i>Closed</i></li></ul><p>I think this issue was fixed by <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Defect: Git: repository page crashes when non-ascii character in tag or branch name (Closed)" href="https://www.redmine.org/issues/16881">#16881</a> and add a test (<a class="changeset" title="scm: git: add test to browse non UTF-8 directory (#25846)" href="https://www.redmine.org/projects/redmine/repository/svn/revisions/19534">r19534</a>).</p>