##// END OF EJS Templates
Ruby 1.9: fix encoding error on wiki diffs (#4050)...
Toshi MARUYAMA -
r7807:1dab1cd5cc9d
parent child
Show More
@@ -88,7 +88,9 class WikiContent < ActiveRecord::Base
88 def text
88 def text
89 @text ||= case compression
89 @text ||= case compression
90 when 'gzip'
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 else
94 else
93 # uncompressed data
95 # uncompressed data
94 data
96 data
General Comments 0
You need to be logged in to leave comments. Login now