UTF-8 data inserting

26 views
Skip to first unread message

Alessandro Tagliapietra

unread,
May 31, 2016, 2:17:33 PM5/31/16
to Slick / ScalaQuery
Hello,

I'm trying to insert some UTF8 chars in a database, my application is play framework + slick,

locally the default configuration is:

slick.dbs.default.driver="util.PostgresDriver$"
slick.dbs.default.db.driver="org.postgresql.Driver"
slick.dbs.default.db.url="jdbc:postgresql:project"
slick.dbs.default.db.maxConnections=18
slick.dbs.default.db.connectionTimeout=20000
slick.dbs.default.logStatements=true

database encoding is both locally and remotely UTF8, collation and character type is en_US.UTF-8.

Locally inserting UTF8 chars works fine.
Remotely I've configured the database using the JDBC_DATABASE_URL env variable, I've added characterEncoding=UTF-8 to the database query string parameter but for example ö is inserted as Ã¶.

Anywhere else I should look at?


Alessandro Tagliapietra

unread,
May 31, 2016, 2:46:15 PM5/31/16
to Slick / ScalaQuery
Ok seems that adding -Dfile.encoding=UTF-8 to the remote jvm command line solves the issue.
Reply all
Reply to author
Forward
0 new messages