github/gollum — Issue #218: Error creating a page with accents in the title
Author: Sephi-Chan
Created: 2011-10-23 12:20:43+00:00
State: open

Hi!

On my home page, I created a link [[Construire un château]]. When I follow it (http://localhost:4567/Construire-un-ch%C3%A2teau), Gollum asks me to create the page. I type my content (for instance "Foo.") and I save.

Boom!!

```

Encoding::CompatibilityError - incompatible character encodings: UTF-8 and ASCII-8BIT:
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/grit-2.4.1/lib/grit/index.rb:170:in `%'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/grit-2.4.1/lib/grit/index.rb:170:in `block in write_tree'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/grit-2.4.1/lib/grit/index.rb:165:in `each'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/grit-2.4.1/lib/grit/index.rb:165:in `write_tree'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/grit-2.4.1/lib/grit/index.rb:114:in `commit'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/gollum-1.3.1/lib/gollum/committer.rb:145:in `commit'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/gollum-1.3.1/lib/gollum/wiki.rb:241:in `write_page'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/gollum-1.3.1/lib/gollum/frontend/app.rb:80:in `block in '
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:1212:in `call'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:1212:in `block in compile!'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:772:in `[]'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:772:in `block (3 levels) in route!'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:788:in `route_eval'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:772:in `block (2 levels) in route!'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:821:in `block in process_route'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:819:in `catch'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:819:in `process_route'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:771:in `block in route!'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:770:in `each'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:770:in `route!'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:886:in `dispatch!'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:706:in `block in call!'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:871:in `block in invoke'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:871:in `catch'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:871:in `invoke'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:706:in `call!'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:692:in `call'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/rack-protection-1.1.4/lib/rack/protection/xss_header.rb:22:in `call'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/rack-protection-1.1.4/lib/rack/protection/path_traversal.rb:16:in `call'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/rack-protection-1.1.4/lib/rack/protection/json_csrf.rb:17:in `call'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/rack-protection-1.1.4/lib/rack/protection/base.rb:47:in `call'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/rack-protection-1.1.4/lib/rack/protection/xss_header.rb:22:in `call'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.5/lib/rack/nulllogger.rb:9:in `call'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.5/lib/rack/head.rb:9:in `call'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/showexceptions.rb:21:in `call'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:1334:in `block in call'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:1403:in `synchronize'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:1334:in `call'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.5/lib/rack/handler/webrick.rb:59:in `service'
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'
localhost - - [23/Oct/2011:14:17:39 CEST] "POST /create HTTP/1.1" 500 124447
http://app.dev:4567/Construire-un-ch%C3%A2teau -> /create
localhost - - [23/Oct/2011:14:17:39 CEST] "GET /__sinatra__/500.png HTTP/1.1" 200 5938
http://app.dev:4567/create -> /__sinatra__/500.png
localhost - - [23/Oct/2011:14:17:39 CEST] "GET /favicon.ico HTTP/1.1" 200 5920
- -> /favicon.ico
```

This behaviour is quite embarrassing for a Wiki written in French.