Strange CSV result for quoted strings in go encoding/csv
问题 I have this little bit of code that kept me busy the whole weekend. package main import ( "encoding/csv" "fmt" "log" "os" ) func main() { f, err := os.Create("./test.csv") if err != nil { log.Fatal("Error: %s", err) } defer f.Close() w := csv.NewWriter(f) var record []string record = append(record, "Unquoted string") s := "Cr@zy text with , and \\ and \" etc" record = append(record, s) fmt.Println(record) w.Write(record) record = make([]string, 0) record = append(record, "Quoted string") s =