
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. I am going to write several web applications in the near future for different clients, and Yesod seems like the promising tool. However, I need this conversion tool -- I *think*; maybe I have the wrong angle altogether. /Fredrik

On 11/05/2011 09:09 AM, Obscaenvs wrote:
Hello, friends. I come in peace.
Hello!
I would like there to be an "umlaut-translator"-function for Yesod (i.e. "ö" -> "ö"), [...]
Is that still necessary? I've a feeling that all browsers support UTF-8 these days, provided that you specify your charsets correctly (which must be done anyway for security reasons). -Isaac

On Sat, Nov 5, 2011 at 2:09 PM, Obscaenvs
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ï
participants (3)
-
Chaddaï Fouché
-
Isaac Dupree
-
Obscaenvs