Firebird JDBC driver connection character encoding

Vitor Hugo picture Vitor Hugo · Oct 31, 2012 · Viewed 14.6k times · Source

I have a JSF application running on tomcat6 in Fedora 17 using firebird as the database and all the registers coming from the database to the application are coming with a encoding problem.

The language is Brazilian portuguese so I need é's and ã's and ç and here all of these special characters come with problems.

The é's and ã's from the original source code are ok, only the ones coming directly from the database are causing me the trouble...

Any idea what is going on?

Heres a image where that weird character should be é

datatable with the problem

The problem happens when it recovers from the DB.

Answer

Vitor Hugo picture Vitor Hugo · Oct 31, 2012

Using encoding=ISO/UTF/WIN... query parameter in the JDBC connection URL has solved the problem.

For example:

jdbc:firebirdsql:url:db?encoding=ISO8859_1