Solved on my own
Gabor Major, October 09, 2016 - 2:59 pm UTC
Hi Guys,
So, first of all, sorry for the lowest rating, nothing personal, but the problem was entirely different from your suggestion. I actually found the correct NLS_LANG value about an hour after submitting my question. It was "AMERICAN_AMERICA.UTF8". On some level it is logical, because this is the encoding of the database, but it is still strange.
BTW the terminal couldn't have been wrong, because, as I stated, the component correctly logs (and the terminal correctly shows) national characters which the component receives from a Java component through a socket.
Thanks for the answer anyway, keep up the good work guys, I've found lots of help in this forum earlier, and I'm certain I will find lots of help in the future as well.
Thanks,
Gabor
October 10, 2016 - 5:32 am UTC
We appreciate all feedback ... good and bad :-)
UTF8
Sergiusz Wolicki, October 10, 2016 - 7:22 pm UTC
You wrote:
"But the strange thing is that when I set the NLS_LANG environment variable to "HUNGARIAN_HUNGARY.UTF8" the component's logging shows "ű" instead of "ű", and other similar values."
Displaying of characters does not depend on the language (maybe except when the language is bi-directional, like Arabic). Hence, it is not theoretically possible to get incorrect characters with "HUNGARIAN_HUNGARY.UTF8" and correct ones with "AMERICAN_AMERICA.UTF8", provided the setting was syntactically correct and exported properly on both occasions. I would be very cautious. It is possible to start having illegal codes in the database, when NLS_LANG and the database character set are the same, as the database does not validation at insert/query. The screen may show proper codes but they may be illegal in the database. Use the DUMP SQL function to verify that the codes in the database are correct.
Diagnosis of NLS issues is not trivial. Do not underestimate the complexity. Seemingly correct results are not necessarily correct.
Thanks,
Sergiusz
October 11, 2016 - 12:44 am UTC
Nice input.