I have added the characterEncoding in the DB url, and it works now.

  ###
    db.driver=com.mysql.jdbc.Driver
    db.url=jdbc:mysql://localhost/hello?characterEncoding=gbk
    db.user=root
    db.password=
  ###

  Thanks very much !  :)

Cheers,
  Neil


On Oct 25, 2:09 am, David Pollak <feeder.of.the.be...@gmail.com>
wrote:
> On Sat, Oct 24, 2009 at 11:03 AM, Neil.Lv <anim...@gmail.com> wrote:
>
> >  Yeah, i using the mysql to test my app.
>
> >  The is in my props file.
> >  ######
> >    db.driver=com.mysql.jdbc.Driver
> >    db.url=jdbc:mysql://localhost/hello
>
> The above line is the problem.  You're not telling the JDBC driver to
> convert Strings to UTF-8 before shipping them over the wire to MySQL.
>
>
>
> >    db.user=root
> >    db.password=
> >  #####
>
> > Cheers,
> >   Neil
>
> > On Oct 25, 1:51 am, jlist9 <jli...@gmail.com> wrote:
> > > I'm not familiar with how Lift handles strings but if the encoding
> > conversion
> > > is what's missing, check out the Java String class, look for work
> > encoding
> > > or charset in java doc. Basically you can create a String with a
> > specified
> > > encoding and use getBytes() to convert it to a different encoding.
>
> > > You can also try setting charset in your page to UTF-8. Maybe this is
> > > the default in Lift.
>
> > > On Sat, Oct 24, 2009 at 10:45 AM, Neil.Lv <anim...@gmail.com> wrote:
>
> > > >  I just use the User's edit method that the ProtoUser ?
>
> > > >  What's method that i can do for conventing GBK to UTF-8 before
> > > > saving ?
>
> > > > Cheers,
> > > >  Neil
>
> > > > On Oct 25, 1:34 am, jlist9 <jli...@gmail.com> wrote:
> > > >> It sounds like you aren't converting GBK encoding to UTF-8
> > > >> before you store the text?
>
> --
> Lift, the simply functional web frameworkhttp://liftweb.net
> Beginning Scalahttp://www.apress.com/book/view/1430219890
> Follow me:http://twitter.com/dpp
> Surf the harmonics

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

Reply via email to