What browser are you using to test?
What container is your app running in?
What OS is your app running on?
On Wed, Nov 12, 2008 at 8:13 AM, sbocq <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I'm facing another UTF-8 encoding issue. When I submit text with
> accented characters in a text field from the browser, the encoding
> gets lost somewhere on its way to the RequestVar. I'm using the code
> snippet below that writes back the list of messages submitted. For
> example, when I type "hé!" in the "Update" submit form, I get back
> "#é# hÃ(c)!" in the browser.
>
> class Update {
> object qpx extends RequestVar(Full("")) // default is empty string
>
> def show(xhtml: NodeSeq): NodeSeq = {
> val msgSent = !(qpx.isEmpty || qpx.open_!.length == 0)
> if (msgSent){
> val msg:Message = Message.create
> msg.text(qpx.open_!).save
> }
> val messages = Message.findAll
> val temp = messages.foldLeft(""){(str, msg) => str + " #é# " +
> msg.text}
>
> bind("qp", xhtml,
> "update" --> text("", v => qpx(Full(v))) % ("size" -> "10")
> % ("id" -> "update"),
> "submit" --> submit(?("Update"), ignore => {}),
> "messages" --> <div>{temp}</div>
> )
> }
> }
>
> <lift:surround with="default" at="content">
> <div class="heading" id="title">¿Qué pasa?</div>
> <lift:Update.show form="POST">
> <label for="update">What's going on? </label>
> <qp:update/>
> <qp:submit/>
> <qp:messages/>
> </lift:Update.show>
> </lift:surround>
>
> Thanks,
> Sebastien
>
> >
>
--
Lift, the simply functional web framework http://liftweb.net
Collaborative Task Management http://much4.us
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Lift" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---