<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Csv on 村边的池塘</title>
    <link>https://jerrywang1981.github.io/tags/csv/</link>
    <description>Recent content in Csv on 村边的池塘</description>
    <generator>Hugo</generator>
    <language>zh-CN</language>
    <lastBuildDate>Tue, 12 May 2020 22:26:51 +0800</lastBuildDate>
    <atom:link href="https://jerrywang1981.github.io/tags/csv/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Golang 导出 csv 乱码的问题</title>
      <link>https://jerrywang1981.github.io/post/go/golang-export-csv/</link>
      <pubDate>Tue, 12 May 2020 22:26:51 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/go/golang-export-csv/</guid>
      <description>问题提出 golang最近导出csv的时候，如果用excel打开，会有乱码。在网上查到了解决方案，记录一下。 解决方案 f, err := os.Create(&amp;#34;data.csv&amp;#34;) if err != nil { panic(err) } defer f.Close() f.WriteString(&amp;#34;\xEF\xBB\xBF&amp;#34;) // 写入UTF-8 BOM，避免使用Microsoft Excel打开乱码 writer := csv.NewWriter(f) writer.Write([]string{&amp;#34;col 1&amp;#34;, &amp;#34;col 2&amp;#34;, &amp;#34;col 3&amp;#34;}) writer.Flush()</description>
    </item>
  </channel>
</rss>
