1

In windows 7 Arabic texts coming as symbols when exporting a file from my project. I'm using MS office 2007 and my project is in rails. is it encoding problem or something else? I'm attaching the screen shot hereexcel file screen shot

    filename = "Print Batch CSV- #{Time.now.to_date.to_s}.csv"
send_data(csv_string, :type => 'text/csv; charset=utf-8; header=present', :filename => filename) 

this is the code for writing csv.

issue is with the MIME type or encoding?

pnuts
  • 58,317
  • 11
  • 87
  • 139
jithya
  • 428
  • 4
  • 13
  • This worked for me `send_data("\uFEFF" + csv_string, :type => 'text/csv; charset=utf-8; header=present', :filename => filename)` https://stackoverflow.com/a/47098902/6856611 – Ahmad Rezk Mar 26 '19 at 14:43

0 Answers0