diff --git a/server.go b/server.go index 8aa6c3f..1c92c06 100644 --- a/server.go +++ b/server.go @@ -128,7 +128,7 @@ func (s *server) createWebPage(title, contents string) (string, error) { } func (s *server) postPage(p *Post, res http.ResponseWriter, req *http.Request) { - res.Header().Add("content-type", "text/html") + res.Header().Add("content-type", "text/html; charset=utf-8") contents, err := p.render(s.templates["fullpost"]) if err != nil { s.errorInRequest(res, req, err) @@ -141,7 +141,7 @@ func (s *server) postPage(p *Post, res http.ResponseWriter, req *http.Request) { } func (s *server) homePage(res http.ResponseWriter, req *http.Request) { - res.Header().Add("content-type", "text/html") + res.Header().Add("content-type", "text/html; charset=utf-8") var posts string diff --git a/templates/page.html b/templates/page.html index 01d265d..b1e9c0b 100644 --- a/templates/page.html +++ b/templates/page.html @@ -5,7 +5,7 @@ - +