erlang csv

Result_str = "r1c1,r1c2,r1c3\nr2c1,r2c2,r2c3",

Bom = unicode:characters_to_list(unicode:encoding_to_bom(utf8)),

unicode:characters_to_binary(Bom++Result_str, unicode, utf8),

%wps能够正确识别,加BOM后office excel能够正确识别(excel2007sp1需打补丁)。

 

posted @ 2015-07-16 14:26  尾巴儿  阅读(193)  评论(0)    收藏  举报