@@ -272,6 +272,13 class Changeset < ActiveRecord::Base | |||||
272 | :undef => :replace, :replace => '?').encode("UTF-8") |
|
272 | :undef => :replace, :replace => '?').encode("UTF-8") | |
273 | end |
|
273 | end | |
274 | end |
|
274 | end | |
|
275 | elsif RUBY_PLATFORM == 'java' | |||
|
276 | begin | |||
|
277 | ic = Iconv.new('UTF-8', enc) | |||
|
278 | str = ic.iconv(str) | |||
|
279 | rescue | |||
|
280 | str = str.gsub(%r{[^\r\n\t\x20-\x7e]}, '?') | |||
|
281 | end | |||
275 | else |
|
282 | else | |
276 | ic = Iconv.new('UTF-8', enc) |
|
283 | ic = Iconv.new('UTF-8', enc) | |
277 | txtar = "" |
|
284 | txtar = "" |
General Comments 0
You need to be logged in to leave comments.
Login now