On Fri, Jan 29, 2010 at 6:06 AM, Adam Warski <[email protected]> wrote:

> Heh, sorry, I knew the moment I write a post here I'll find the answer ;)
>
> Forgot that when converting a table in mysql you not only need to set the
> character encoding for the table but also for the individual columns.
>

My experience has been that PostgreSQL doesn't have these kind of issues and
is generally faster and more stable than MySQL.  FYI.


>
> Sorry again for the spam.
>
> On Jan 29, 2010, at 3:01 PM, Adam Warski wrote:
>
> > Hello,
> >
> > maybe you have some ideas. I'm trying to make my lift app able to store
> polish characters, and I'm slowly running out of ideas.
> > I think it's something with mapper configuration, but I'm not sure.
> >
> > When I submit a form with an "ą" character, I get the following
> exception:
> >
> > Message: java.sql.SQLException: Incorrect string value: '\xC4\x85' for
> column 'title' at row 1
> >       com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
> >
> > What I did so far:
> > - the mysql table encoding is utf-8
> > - the connection string contains useUnicode=true&characterEncoding=UTF-8
> > - LiftRules.early.append(_.setCharacterEncoding("UTF-8"))
> >
> > When the String is set on the model field it still is correct, so
> something happens when trying to persist the value. Is there a way in lift
> to configure jdbc so that it accepts utf-8 characters? Or am I missing
> something else?
> >
> > --
> > Adam Warski
> > http://www.warski.org
> > http://www.softwaremill.eu
> >
> >
> >
> >
> > --
> > 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]<liftweb%[email protected]>
> .
> > For more options, visit this group at
> http://groups.google.com/group/liftweb?hl=en.
> >
>
> --
> Adam Warski
> http://www.warski.org
> http://www.softwaremill.eu
>
>
>
>
> --
> 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]<liftweb%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/liftweb?hl=en.
>
>


-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://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 [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.

Reply via email to