Lift and Cyrillic

22 views
Skip to first unread message

L S

unread,
Sep 8, 2011, 12:03:16 PM9/8/11
to Lift
Hi!
I use lift with NetBeans IDE(7.0) and GlassFish(3.1.1).
When forms with method post pass cirillic string(for example Привет),
application gets some trash - Привет
when use method get - string pass all right.
when use server Jetty, both - post and get method work OK.
on jBoss project can not deploy.
Lift works on Jetty only?

David Pollak

unread,
Sep 8, 2011, 12:07:19 PM9/8/11
to lif...@googlegroups.com

No.  Lift works on any Servlet 2.5+ container.

The issue is that some containers ignore the encoding header and use the JVM's native encoding for non-ASCII characters.

Please post your boot.scala file.  Usually, something like:
    // Force the request to be UTF-8
    LiftRules.early.append(_.setCharacterEncoding("UTF-8"))

In Boot.scala forces the container to "do the right thing."
 

--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to lif...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.




--
Lift, the simply functional web framework http://liftweb.net

L S

unread,
Sep 8, 2011, 12:48:29 PM9/8/11
to Lift
Thank!
Yes, I append in boot.scala
// Force the request to be UTF-8
LiftRules.early.append(_.setCharacterEncoding("UTF-8"))
and Cyrillic works good on GlassFish.
(I used lift-archetype-blank, but in lift-archetype-basic this force
the container include)
Reply all
Reply to author
Forward
0 new messages