Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to set Talend client encoding for jdbc use?

Hi,

When I try to import data from mdb file to Postgres database the following error appears cause some rows have characters with accent ('è', 'é', 'à') .
DBD::Pg::st execute failed: ERROR:  invalid byte sequence for encoding "UTF8": 0xe87265
can't execute insert query

Postgres database encoding is 'UTF8' whereas Mdb file encoding seems to be 'ISO-8859-15'. ODBC is used to read mdb file while JDBC is used to connect to postgres. Can we say to postgres what encoding is used for sent data? I know that jdbc provide a "charSet" parameter but I did not know how to use it with Talend.
Does somebody has an idea of how to set client encoding within Talend? 😕
Thanks,
Matthieu (TOS newbie 0683p000009MACn.png )
Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Only MySQL connection encoding is modified when encoding is set to UTF-8. We have to do it also for PostgreSQL. I don't know yet how to do this, I'll search PostgreSQL documentation. Can you create a bug entry for this?

View solution in original post

6 Replies
Anonymous
Not applicable
Author

Only MySQL connection encoding is modified when encoding is set to UTF-8. We have to do it also for PostgreSQL. I don't know yet how to do this, I'll search PostgreSQL documentation. Can you create a bug entry for this?
Anonymous
Not applicable
Author

Hi,
in PostgreSQL it is possible to set the client decoding to a different charset than the server. Maybe you can use this.
See section -> 20.2.3. Automatic Character Set Conversion Between Server and Client:
http://www.postgresql.org/docs/8.0/interactive/multibyte.html
Anonymous
Not applicable
Author

I read this post too which talk about client decoding but here we cannot use this cause, if I understood, it is applied for all client connections...
I don't think our DBA likes it 0683p000009MA9p.png
So to answer Plegall, I will create a bug entry.
Thanks for your answers,
Matthieu
Anonymous
Not applicable
Author

Hi,
I'm sorry. I didn't know that the link was already posted. But you can use a SQL command in PostgreSQL to set the client session encoding, that is only valid for the session you're using. So you won't be making your DBA angry. In the PostgreSQL list archives sombody did I nice post about it.
Mayby you can use or test it:
http://archives.postgresql.org/pgsql-jdbc/2004-11/msg00075.php
He uses the SQL command: SET CLIENT_ENCODING TO Latin1
I hope this helps a little bit.
Anonymous
Not applicable
Author

Hi,
The bug has been fixed today (see 372).
Thank you very much Plegall for you reactivity 0683p000009MACJ.png It works!
Matthieu
BathSeal
Contributor
Contributor

I didn't know that the link was already posted. But you can use a SQL command in PostgreSQL to set the client session encoding, that is only valid for the session you're using.  TelltheBell