diff --git a/lib/gollum/markup.rb b/lib/gollum/markup.rb index 16cc2399..e05be2e2 100644 --- a/lib/gollum/markup.rb +++ b/lib/gollum/markup.rb @@ -401,7 +401,7 @@ module Gollum end highlighted = begin - encoding ||= Encoding::UTF_8 + encoding ||= 'utf-8' blocks.map { |lang, code| Pygments.highlight(code, :lexer => lang, :options => {:encoding => encoding.to_s}) } rescue ::RubyPython::PythonError [] diff --git a/test/test_markup.rb b/test/test_markup.rb index f788682e..fea98090 100644 --- a/test/test_markup.rb +++ b/test/test_markup.rb @@ -432,7 +432,7 @@ context "Markup" do index.commit("Add alpha.jpg") page = @wiki.page("Bilbo Baggins") - rendered = Gollum::Markup.new(page).render(false, Encoding::UTF_8) + rendered = Gollum::Markup.new(page).render(false, 'utf-8') assert_equal output, rendered end