Send Beginners mailing list submissions to beginners@haskell.org To subscribe or unsubscribe via the World Wide Web, visit http://www.haskell.org/mailman/listinfo/beginners or, via email, send a message with subject or body 'help' to beginners-requ...@haskell.org
You can reach the person managing the list at beginners-ow...@haskell.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Beginners digest..." Today's Topics: 1. Yesod umlaut issue (Obscaenvs) 2. Re: Yesod umlaut issue (Isaac Dupree) 3. Re: Yesod umlaut issue (Chadda? Fouch?) 4. Re: Yesod umlaut issue (Chadda? Fouch?) ---------------------------------------------------------------------- Message: 1 Date: Sat, 05 Nov 2011 14:09:37 +0100 From: Obscaenvs <obscae...@gmail.com> Subject: [Haskell-beginners] Yesod umlaut issue To: beginners@haskell.org Message-ID: <4eb53591.8000...@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed 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 ------------------------------ Message: 2 Date: Sat, 05 Nov 2011 10:03:57 -0400 From: Isaac Dupree <m...@isaac.cedarswampstudios.org> Subject: Re: [Haskell-beginners] Yesod umlaut issue To: beginners@haskell.org Message-ID: <4eb5424d.70...@isaac.cedarswampstudios.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed 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 ------------------------------ Message: 3 Date: Sat, 5 Nov 2011 15:31:05 +0100 From: Chadda? Fouch? <chaddai.fou...@gmail.com> Subject: Re: [Haskell-beginners] Yesod umlaut issue To: Obscaenvs <obscae...@gmail.com> Cc: beginners@haskell.org Message-ID: <CANfjZRbp=9tgzrb+xm0g50qe3sehnykef+eb1tbgtm22yk5...@mail.gmail.com> Content-Type: text/plain; charset=UTF-8 On Sat, Nov 5, 2011 at 2:09 PM, Obscaenvs <obscae...@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? ------------------------------ Message: 4 Date: Sat, 5 Nov 2011 16:16:44 +0100 From: Chadda? Fouch? <chaddai.fou...@gmail.com> Subject: Re: [Haskell-beginners] Yesod umlaut issue To: Obscaenvs <obscae...@gmail.com>, beginners <beginners@haskell.org> Message-ID: <CANfjZRY+YgKF8b-TSRrTMFJTUrMpJzux=xkctqnndom9cp3...@mail.gmail.com> Content-Type: text/plain; charset=UTF-8 On Sat, Nov 5, 2011 at 3:59 PM, Obscaenvs <obscae...@gmail.com> wrote: > > As for a related issue, it isn't immediately obvious from the Yesod book how > I should go about producing "Γ" for instance in the html output -- if > I do > > gammaString = "Γ" > ...later... > #{gammaString} > > ...then this will result in "&Gamma;" being output in the html source. > Should I in this case also produce Html directly? It's pretty good having > these as shortcuts, as long as I do not have a keyboard that can easily > switch to, say, Greek encoding... > Well, I guess those shortcuts are only present in your own code and strings, so using something like > #{preEscapedText myStringWithEntities} is probably not too much of a security risk, just be more cautious if you're getting outside content... -- Jeda? ------------------------------ _______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners End of Beginners Digest, Vol 41, Issue 7 ****************************************