aboutsummaryrefslogtreecommitdiff
path: root/cmd/label-tool
diff options
context:
space:
mode:
authorPřemysl Janouch <p@janouch.name>2019-04-25 21:33:20 +0200
committerPřemysl Janouch <p@janouch.name>2019-04-25 21:54:58 +0200
commite56482d73f6d8f8f46096ca980ac9e6dcd7b8300 (patch)
treefb8b5bf89be590a67b3cfac0ab7466aae5f1facd /cmd/label-tool
parent2f47b3f5da0ae9588d16d4b010402906111fd559 (diff)
downloadsklad-e56482d73f6d8f8f46096ca980ac9e6dcd7b8300.tar.gz
sklad-e56482d73f6d8f8f46096ca980ac9e6dcd7b8300.tar.xz
sklad-e56482d73f6d8f8f46096ca980ac9e6dcd7b8300.zip
label-tool: send pages as UTF-8
Diffstat (limited to 'cmd/label-tool')
-rw-r--r--cmd/label-tool/main.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/label-tool/main.go b/cmd/label-tool/main.go
index 1e5ab4a..d2ac4f9 100644
--- a/cmd/label-tool/main.go
+++ b/cmd/label-tool/main.go
@@ -137,7 +137,7 @@ func handle(w http.ResponseWriter, r *http.Request) {
if fontIndex, err = strconv.Atoi(r.FormValue("font")); err == nil {
font = fonts[fontIndex]
} else {
- w.Header().Set("Content-Type", "text/html")
+ w.Header().Set("Content-Type", "text/html; charset=utf-8")
if err := tmplFont.Execute(w, fonts); err != nil {
http.Error(w, err.Error(), 500)
}
@@ -217,7 +217,7 @@ func handle(w http.ResponseWriter, r *http.Request) {
}
if _, ok := r.Form["render"]; !ok {
- w.Header().Set("Content-Type", "text/html")
+ w.Header().Set("Content-Type", "text/html; charset=utf-8")
if err := tmplForm.Execute(w, &params); err != nil {
http.Error(w, err.Error(), 500)
}