diff --git a/appview/pulls/pulls.go b/appview/pulls/pulls.go --- a/appview/pulls/pulls.go +++ b/appview/pulls/pulls.go @@ -447,7 +447,7 @@ didHandleMap[identity.DID.String()] = identity.DID.String() } } - w.Header().Set("Content-Type", "text/plain") + w.Header().Set("Content-Type", "text/plain; charset=utf-8") w.Write([]byte(pull.Submissions[roundIdInt].Patch)) } diff --git a/appview/repo/repo.go b/appview/repo/repo.go --- a/appview/repo/repo.go +++ b/appview/repo/repo.go @@ -590,7 +590,7 @@ w.Write(body) return } - w.Header().Set("Content-Type", "text/plain") + w.Header().Set("Content-Type", "text/plain; charset=utf-8") w.Write([]byte(result.Contents)) return } diff --git a/hook/hook.go b/hook/hook.go --- a/hook/hook.go +++ b/hook/hook.go @@ -63,7 +63,7 @@ if err != nil { return fmt.Errorf("failed to create request: %w", err) } - req.Header.Set("Content-Type", "text/plain") + req.Header.Set("Content-Type", "text/plain; charset=utf-8") req.Header.Set("X-Git-Dir", gitDir) req.Header.Set("X-Git-User-Did", userDid) req.Header.Set("X-Git-User-Handle", userHandle) diff --git a/knotserver/handler.go b/knotserver/handler.go --- a/knotserver/handler.go +++ b/knotserver/handler.go @@ -187,6 +187,6 @@ version = "unknown" } } - w.Header().Set("Content-Type", "text/plain") + w.Header().Set("Content-Type", "text/plain; charset=utf-8") fmt.Fprintf(w, "knotserver/%s", version) }