From e56482d73f6d8f8f46096ca980ac9e6dcd7b8300 Mon Sep 17 00:00:00 2001 From: Přemysl Janouch
Date: Thu, 25 Apr 2019 21:33:20 +0200 Subject: label-tool: send pages as UTF-8 --- cmd/label-tool/main.go | 4 ++-- 1 file 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, ¶ms); err != nil { http.Error(w, err.Error(), 500) } -- cgit v1.2.3-70-g09d2