I'm learning to use Enlive in combination with Noir. I have an html
template, saved as UTF-8, with non-ascii characters (such as ©). When
I serve this file directly from Apache, it works fine. However, when I
read the file through net.cgrand.enlive-html/template and serve it
with jetty, UTF-8 characters are mangled.
I'm starting a Jetty server with:
(noir.server/start 8080)
and I serve the file on url /page like this:
(defpage "/page" []
(html/template "web/views/page.html" []))
Firefox says (in its view->character encoding menu) the file is UTF-8
encoded. I tried using html entities (© instead of ©) without
luck.
What am I missing?
With kind regards,
Gert
Take a look at your HTML templates and make sure that they declare the correct encoding (utf-8 is a good choice). Here's what I use at the top of my files. Notice the charset.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
I hope that helps.
Steve
> --
> You received this message because you are subscribed to the Google Groups "Enlive" group.
> To post to this group, send email to enliv...@googlegroups.com.
> To unsubscribe from this group, send email to enlive-clj+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/enlive-clj?hl=en.
>