Unable to write Multi byte Character(like Chinese/Japanese) to Oracle

One Star

Unable to write Multi byte Character(like Chinese/Japanese) to Oracle

Hi Team,
I want to read multibyte characters like Chinese/Japanese character from excel and insert into oracle database table. So what I did for this:

I have created database table with nvarchar2 datatype column for storing multibyte character.
Then I have created excel file in talend and able to see the data in preview.(or even able to see in logRow in console)
I am using tMap to join these two (excel and database table)
It is running successfully and inserting records into the table but the inserted data is junk character (not the actual one, even I exported the data from sql developer/plsql developer in excel but its junk)
Also I am using UTF-8 as a encoding style in talend Data integration 6.2.1 as well as in Oracle Database.

Is there anything I am missing ?
Thanks in advance.
Regards,
Rakesh D

Accepted Solutions
Eleven Stars

Re: Unable to write Multi byte Character(like Chinese/Japanese) to Oracle

try using nvarchar(100)

Francois Denis

Tag as "solved" for others! Kudos to thanks!

Tags (1)

All Replies
Moderator

Re: Unable to write Multi byte Character(like Chinese/Japanese) to Oracle

Hi,
Have you tried to add the "Dfile.encoding=utf-8" to the JVM parameters to see if it works?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: Unable to write Multi byte Character(like Chinese/Japanese) to Oracle

it does not help, I am getting this error:

 

Error: Could not find or load main class Dfile.encoding=utf-8

Eleven Stars

Re: Unable to write Multi byte Character(like Chinese/Japanese) to Oracle

normally java default String are in UTF8. so it must work without forcing encoding.

Francois Denis

Tag as "solved" for others! Kudos to thanks!

Eleven Stars

Re: Unable to write Multi byte Character(like Chinese/Japanese) to Oracle

can you check your db charset!
try to insert chinese chars into your db using query

Francois Denis

Tag as "solved" for others! Kudos to thanks!

One Star

Re: Unable to write Multi byte Character(like Chinese/Japanese) to Oracle

Hello,

 

I tried to insert in DB but same issue :

create table tmp_multi (str varchar2(100));

insert into tmp_multi values ('碟庫');

select * from tmp_multi;

--> ¿¿

your thinking is correct and below are my nls_database_parameters setting: Please advice which parameter I need to modify to insert multibyte character (may be NLS_CHARACTERSET):

 

ParameterValue
NLS_LANGUAGEAMERICAN
NLS_TERRITORYAMERICA
NLS_CURRENCY$
NLS_ISO_CURRENCYAMERICA
NLS_NUMERIC_CHARACTERS.,
NLS_CHARACTERSETWE8MSWIN1252
NLS_CALENDARGREGORIAN
NLS_DATE_FORMATDD-MON-RR
NLS_DATE_LANGUAGEAMERICAN
NLS_SORTBINARY
NLS_TIME_FORMATHH.MI.SSXFF AM
NLS_TIMESTAMP_FORMATDD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMATHH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMATDD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY$
NLS_COMPBINARY
NLS_LENGTH_SEMANTICSBYTE
NLS_NCHAR_CONV_EXCPFALSE
NLS_NCHAR_CHARACTERSETAL16UTF16
NLS_RDBMS_VERSION11.2.0.4.0
Eleven Stars

Re: Unable to write Multi byte Character(like Chinese/Japanese) to Oracle

try using nvarchar(100)

Francois Denis

Tag as "solved" for others! Kudos to thanks!

Tags (1)
Six Stars

Re: Unable to write Multi byte Character(like Chinese/Japanese) to Oracle

Hi All,

 

I know this thread has been answered to but i am having issues exporting a table from a Teradata source that has Chinese characters. The job I have made is as below:

 

Capture.JPG

 

tfile_properties.JPG

However the output I am getting is show here, where the sub are actually where the Chinese characters are supposed to be.

 

Capture2.JPG

Can someone please help me on this?

 

thanks 

Eleven Stars

Re: Unable to write Multi byte Character(like Chinese/Japanese) to Oracle

chinese -- utf16

Francois Denis

Tag as "solved" for others! Kudos to thanks!

Six Stars

Re: Unable to write Multi byte Character(like Chinese/Japanese) to Oracle

hi denis,

 

Thank you for the reply!

Sadly it didn't work for me.

 

Seems like I don't have the UTF-16 option from the drop down list and had to put it as custom.

 

Capture.JPG