accent problem with jdbc Oracle connection

Highlighted
One Star

accent problem with jdbc Oracle connection

hi,
I use a jdbc Oracle connection in a tDbInbut
The accent seem disappear in my output Row. for exemple 'é' become 'e'. (but if i run my query in the SQL Builder, accents are ok )
I think its a encoding problem.
Do you have a idea ?
thanks
PS : I try to change the encoding in the field 'encoding' on the tDbInput Properties but it doesn't change anything
Tags (1)
Employee

Re: accent problem with jdbc Oracle connection

Note: in a tDBInput, you don't use a JDBC connection, but Perl DBI connector.
Where does the data come from? (which encoding), where do they go? (which encoding)
One Star

Re: accent problem with jdbc Oracle connection

Data come from a VARCHAR field in a Oracle Table, the encoding used is UTF-8 (the Oracle NLS_CHARACTERSET parameter has "AL32UTF8" Value)
My output is a text File. For moment, the encoding of the text file is not important, i just want to distinct 'é' and 'e' characters in this file.
When i open the text file in hexa mode both caracters 'é' and 'e' have been replace by '65' value.
(I try to change the Encoding parameter of the tFileOutputDelimited ( 'ISO-8859-15' or 'utf-8'))
Employee

Re: accent problem with jdbc Oracle connection

After many tries, I think I can give some tips :-)
The very first thing you have to make sure of is the value of the environment parameter NLS_LANG. If you want to retrieve UTF-8 data, you have to say that NLS_LANG equals AMERICAN_AMERICA.AL32UTF8. In a tPerl before anything else, put the following code:
$ENV{NLS_LANG} = 'AMERICAN_AMERICA.AL32UTF8';

This first operation should avoid conversion to ASCII characters.
There are other tips (I think I'll write a blog ticket or a wiki page about this), but let's try them one by one.
One Star

Re: accent problem with jdbc Oracle connection

Great !
it works!
plegall says : >there are other tips (I think I'll write a blog ticket or a wiki page about this),
I am interested if you have some explanations about this :-)

Thanks a lot
Employee

Re: accent problem with jdbc Oracle connection

I am interested if you have some explanations about this :-)

You might be interested in my last blog ticket Oracle to file in UTF-8, with Perl

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch

Downloads and Trials

Test drive Talend's enterprise products.

Downloads