Browse Source

label-tool: send pages as UTF-8

master
Přemysl Janouch 3 weeks ago
parent
commit
e56482d73f
Signed by: Přemysl Janouch <p@janouch.name> GPG Key ID: A0420B94F92B9493
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      cmd/label-tool/main.go

+ 2
- 2
cmd/label-tool/main.go View File

@@ -137,7 +137,7 @@ func handle(w http.ResponseWriter, r *http.Request) {
137 137
 	if fontIndex, err = strconv.Atoi(r.FormValue("font")); err == nil {
138 138
 		font = fonts[fontIndex]
139 139
 	} else {
140
-		w.Header().Set("Content-Type", "text/html")
140
+		w.Header().Set("Content-Type", "text/html; charset=utf-8")
141 141
 		if err := tmplFont.Execute(w, fonts); err != nil {
142 142
 			http.Error(w, err.Error(), 500)
143 143
 		}
@@ -217,7 +217,7 @@ func handle(w http.ResponseWriter, r *http.Request) {
217 217
 	}
218 218
 
219 219
 	if _, ok := r.Form["render"]; !ok {
220
-		w.Header().Set("Content-Type", "text/html")
220
+		w.Header().Set("Content-Type", "text/html; charset=utf-8")
221 221
 		if err := tmplForm.Execute(w, &params); err != nil {
222 222
 			http.Error(w, err.Error(), 500)
223 223
 		}

Loading…
Cancel
Save