lsegal/yard — Issue #459: Generating docs with Markdown complains about encoding
Author: dvyjones
Created: 2012-01-14 15:58:42+00:00
State: open

When I try to generate documentation with markdown markup, this happens:

```
% yardoc -m markdown
[error]: Exception occurred while generating 'ContextIO/Account.html'
[error]: TypeError: Input must be UTF-8 or US-ASCII, ASCII-8BIT given
[error]: Stack trace:
/Users/dvyjones/.rvm/gems/ruby-1.9.3-p0/gems/redcarpet-2.0.1/lib/redcarpet.rb:70:in `render'
/Users/dvyjones/.rvm/gems/ruby-1.9.3-p0/gems/redcarpet-2.0.1/lib/redcarpet.rb:70:in `to_html'
/Users/dvyjones/.rvm/gems/ruby-1.9.3-p0/gems/yard-0.7.4/lib/yard/templates/helpers/html_helper.rb:68:in `html_markup_markdown'
/Users/dvyjones/.rvm/gems/ruby-1.9.3-p0/gems/yard-0.7.4/lib/yard/templates/helpers/html_helper.rb:41:in `htmlify'
/Users/dvyjones/.rvm/gems/ruby-1.9.3-p0/gems/yard-0.7.4/templates/default/docstring/html/text.erb:3:in `_erb_cache_20'
/Users/dvyjones/.rvm/gems/ruby-1.9.3-p0/gems/yard-0.7.4/lib/yard/templates/template.rb:238:in `erb'

Files: 26
Modules: 6 ( 1 undocumented)
Classes: 19 ( 1 undocumented)
Constants: 8 ( 1 undocumented)
Methods: 25 ( 3 undocumented)
89.66% documented
```

I've tried to pass in `--charset=UTF-8` and `--charset UTF-8`, I've tried using the `LANG` environment variable mentioned in the docs somewhere, I've tried doing `RUBYOPT="-EUTF-8:UTF-8"`, but nothing seems to be working.

```
% ruby --version
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin11.2.0]
% yard --version
yard 0.7.4
```