Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Special Characters lost in transfer between Databases via JAVA webservices

Shatter58Dec 8 2021

Hello Community,
a good day to ye all.
I do hope I have selected the correct group - if not I hope the group admin moved the question to the correct group. In that case: sorry and thankl you.
The issue:
We have a situation with Java webservices and German characters which I can't get a grip on.
Data is exchanged between two databases, A and B, both 19.x, on different Linux (RedHat) servers.
Data transfer is done via a chain of java webservices, who reside on a third Linux server and are run on Wildfly 16 servers.
The data itself is transferred strictly as Java STRINGs, the content of the strings is XML text.
During this transfer the special characters (German Umlaute) are clobbered.
So, summarized:
two Oracle-19 databases, each on a seperate Linux server
four webservices, programmed in JAVA, all on a third Linux server
one webserver reads the data from database A through a webservice datasource
one webserver writes the data to database B through a webservice datasource
one webservice connects to the WE8ROMAN8 DB, another to the WE8ISO8859P15 DB
data between the webservices is transferred as JAVA created strings
both DBs have NLS_NCHAR_CHARACTERSET=AL16UTF16
Database A has NLS_CHARACTERSET=WE8ROMAN8
Database B has NLS_CHARACTERSET=WE8ISO8859P15
Linux/Java (the webservices) should be UTF-8, so a third charset could be in the game.
the German Umlauts are clobbered.
I have no idea how to handle the situation concerning the character set conversions.
What have I been thinking of:
Can it be handled by setting NLS_LANG to UTF-8 on the Linux system of the webserver?
Do I have to add config information to the webserver's datasource configuration?
Do I have to set a parameter when opening the data source in Java …
Do I have to configure the JDBC connection upon opening?
and so on …
Any help will be greatly appreciated.
Best regards,
Joachim

Comments
Post Details
Added on Dec 8 2021
4 comments
721 views