From da1d1a1ef2e982638c0111dd4ee549c8453e2903 Mon Sep 17 00:00:00 2001 From: Ada Date: Sun, 26 Nov 2023 02:53:24 +0100 Subject: [PATCH] fix(backend): broken utf8 on raw view --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index c4cd240..2fdec8a 100644 --- a/main.go +++ b/main.go @@ -34,7 +34,7 @@ func handleRequest(w http.ResponseWriter, r *http.Request) { if UrlExist(clearPath) { if strings.HasSuffix(path, "/raw") { pasteContent := getContent(clearPath) - w.Header().Set("Content-Type", "text/plain") + w.Header().Set("Content-Type", "text/plain; charset=utf-8") _, err := io.WriteString(w, pasteContent) if err != nil { log.Println(err)