@@ -88,7 +88,9 class WikiContent < ActiveRecord::Base | |||
|
88 | 88 | def text |
|
89 | 89 | @text ||= case compression |
|
90 | 90 | when 'gzip' |
|
91 | Zlib::Inflate.inflate(data) | |
|
91 | str = Zlib::Inflate.inflate(data) | |
|
92 | str.force_encoding("UTF-8") if str.respond_to?(:force_encoding) | |
|
93 | str | |
|
92 | 94 | else |
|
93 | 95 | # uncompressed data |
|
94 | 96 | data |
General Comments 0
You need to be logged in to leave comments.
Login now