Ruby 从 gmail 导出的 csv,无法导入

lukefan · April 28, 2014 · Last by lukefan replied at April 28, 2014 · 2370 hits

尝试用 excel 打开,好像是 utf-8 的编码。 但是用CSV.parse(File.open('google.csv')的时候,却被告知:ArgumentError: invalid byte sequence in UTF-8 尝试进行了各种转换,好像还是不对啊。

尝试了 http://ruby-china.org/topics/16504 中的方法: iconv -f GBK -t UTF-8 google.csv > g.csv 输出: iconv: google.csv:1:0: cannot convert

按照 google 格式导出,怎么都搞不对,后来按照 outlook 格式导出,然后执行 iconv 从 gbk 转换成 utf8 然后就能够工作了,这叫什么事请啊?

You need to Sign in before reply, if you don't have an account, please Sign up first.