Fix
This commit is contained in:
1 parent
486502852e
commit
0e48ea427b
23 files changed
+386
-78
No files matched your search
@@ -0,0 +1,15 @@
|
||||
package httpapi
|
||||
|
||||
import (
|
||||
"encoding/csv"
|
||||
"io"
|
||||
)
|
||||
|
||||
// newUTF8CSVWriter writes the UTF-8 signature so Excel can recognize characters
|
||||
// such as č, š and ž when opening exported CSVs directly.
|
||||
func newUTF8CSVWriter(w io.Writer) (*csv.Writer, error) {
|
||||
if _, err := io.WriteString(w, "\ufeff"); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return csv.NewWriter(w), nil
|
||||
}
|
||||
Reference in new issue
Block a user