geraldb/slideshow — pull request #7 by marcandre (2012-02-21 01:09:21+00:00)
Title: Fix for utf-8 issue

Thanks for slideshow, very useful.

It would be great if tests/specs were added, though. In the meantime, here's a shell script to illustrate the issue:

```
echo "<%= include 'intro.textile' %>" > main.textile
echo "Marc-André" > intro.textile
slideshow main.textile

# => /Users/mal/.rvm/gems/ruby-1.9.3-p0/gems/slideshow-0.9.9/lib/slideshow/filters/text_filter.rb:309:in `gsub!': invalid byte sequence in US-ASCII (ArgumentError)
```

Problem are the filters that start from scratch instead of the given content; the "" has the encoding of the current source file, which defaults to ASCII. This creates problems down the line when UTF-8 text is inserted.

Fix is trivial, just add the magic comment to specify utf-8 encoding.

Thanks.