gitlabhq/gitlabhq — Issue #175: Tree viewer won't respond for multibyte dir/filenames
Author: merikonjatta
Created: 2011-12-08 07:29:58+00:00
State: open

I have a few projects that have directories/files with Japanese characters in their names.
I can't move into them in the tree viewer. No visible errors, just no response of any kind.

Here's some relevant log excerpt:

```
Started GET "/translations/master/tree/2011-03-15%20%E4%BD%90%E8%97%A4%20AR%20Appliance%20Control" for 0.0.0.0 at 2011-12-08 16:20:20 +0900
Processing by RefsController#tree as JS
Parameters: {"project_id"=>"translations", "id"=>"master", "path"=>"2011-03-15 佐藤 AR Appliance Control"}
Rendered projects/_refs.html.haml (2.9ms)
Rendered refs/_tree.html.haml (18.7ms)
Rendered refs/tree.js.haml (21.5ms)
Completed 500 Internal Server Error in 39ms

ActionView::Template::Error (Tree#contents delegated to tree.contents, but tree is nil: #, @ref="mast
er", @path="2011-03-15 佐藤 AR Appliance Control">):
14: - if tree.is_blob?
15: = render :partial => "refs/tree_file", :locals => { :name => tree.name, :content => tree.data, :file => tree }
16: - else
17: - contents = tree.contents
18: %table#tree-slider.round-borders
19: %thead
20: %th Name
app/models/tree.rb:8:in `rescue in contents'
app/models/tree.rb:5:in `contents'
app/views/refs/_tree.html.haml:17:in `_app_views_refs__tree_html_haml___744787708_76998170'
app/views/refs/tree.js.haml:3:in `_app_views_refs_tree_js_haml__96449483_77056650'
```

I'm running Gitlab on Ubuntu Server 10.04, and this repo was originally pushed from a Mac OS X Snow Leopard,
so I'm pretty sure the filenames are in UTF-8.