2008-01-08
ruport中文乱码
关键字: rails ruport
def index
table = Ruport::Data::Table.new :data => [["dd","男",3], [3,4,5]],
:column_names => %w[姓名 性别 年龄]
puts table.to_csv #-------1
send_data table.to_csv,
:type => "application/csv",
:disposition => "inline",
:filename => "report.csv"
end
在第四行打印的时候是中文,但是最后到处的文件就是乱码!
- 13:41
- 浏览 (246)
- 论坛浏览 (711)
- 评论 (4)
- 分类: rails
- 相关推荐







评论排行榜