This commit is contained in:
greeneclipse committed 2026-10-20 17:03:09 +02:00
1 parent 486502852e
commit 0e48ea427b
23 files changed
+386 -78

No files matched your search

+15
View File
@@ -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
}