For anybody that's getting bitten by the "redundant UTF-8 sequence" bug when attempting to upload an Excel file (which is likely causing the error Ryan refers to), a fix has been implemented in the 3-2-stable branch of rails, but not released yet. In order to get this goodness into your own app, simply create this file:
ruby
moduleActiveSupport::JSON::Encodingdefself.escape(string)
if string.respond_to?(:force_encoding)
string = string.encode(::Encoding::UTF_8, :undef => :replace).force_encoding(::Encoding::BINARY)
end
json = string.gsub(escape_regex) { |s| ESCAPED_CHARS[s] }
json = %("#{json}")
json.force_encoding(::Encoding::UTF_8) if json.respond_to?(:force_encoding)
json
endend
...and be sure te require it. You should be good to go, after that.
For anybody that's getting bitten by the "redundant UTF-8 sequence" bug when attempting to upload an Excel file (which is likely causing the error Ryan refers to), a fix has been implemented in the 3-2-stable branch of rails, but not released yet. In order to get this goodness into your own app, simply create this file:
...and be sure te
require
it. You should be good to go, after that.