middleman/middleman-syntax — pull request #31 by unity (2013-10-03 15:52:48+00:00)
Title: Force encoding to UTF8 before passing content to highlighter

Rouge expects content to be a valid UTF8 string. If the string does not contain UTF-8 Characters, it is casted to ASCII-8BIT, Triggerring an error:

To reproduce:
**index.slim**
```
- code('html') do
== "BOB".force_encoding(Encoding::UTF_8)
```
=>
```
Bad encoding: ASCII-8BIT,BINARY. Please convert your string to UTF-8.
```

**index.slim**
```
- code('html') do
== "BOBé".force_encoding(Encoding::UTF_8)
```
=> Works.

We make sure "content" passed to highlighter a valid UTF8 string.