Answer the question
In order to leave comments, you need to log in
Encoding xls file when requesting rails?
There is an xls file generation, it works correctly, when accessed from the browser, the file is downloaded and displayed in excel with the correct encoding, so if I make a request through the HTTP client, I also get the correct Russian text. I need to attach this file to a letter, I make a request using ActionDispatch::Integration::RequestHelpers session.get('issues#index', {format: :xls,})
and as a result, question marks instead of Russian text in session.response.body. and
encode("UTF-8", :invalid => :replace, :undef => :replace, :replace => "")
doesn't help, it just doesn't change anything. Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question