[Haskell-beginners] Yesod umlaut issue
Chaddaï Fouché
chaddai.fouche at gmail.com
Sat Nov 5 15:31:05 CET 2011
On Sat, Nov 5, 2011 at 2:09 PM, Obscaenvs <obscaenvs at gmail.com> wrote:
> Hello, friends. I come in peace.
>
> I would like there to be an "umlaut-translator"-function for Yesod (i.e. "ö"
> -> "ö"), but I have yet to find it. Furthermore the "#{}"-syntax does
> escaping of stuff like '<', '>' and, a more troubling '&' which is used in
> the umlaut-syntax. So any umlaut-translator would have to do this *after*
> the application of toHtml by the "#{}"-syntax which complicates writing ones
> own umlaut-converter. I may be totally wrong here; if so, feel free to
> correct me. I am also rather new to Yesod, but I am intent on giving it a
> good evaluation.
You could simply write your "umlaut-translator" to produce Html
directly instead of a String so that #{} don't try to interpret it but
as Isaac said, you should probably just use utf-8, that would bypass
the problem altogether.
All new webpages should be written in utf-8 today anyway, as far as I
know any character that _has_ to be transformed into an entity by
toHtml is.
--
Jedaï
More information about the Beginners
mailing list