I'm trying to create a report in iReport. That report has to fetch some data from our database. One of the things it has to get is a total sum, that also has to be converted from a number to text - $323 -> three hundred and twenty-three. The problem is that we have to use polish characters in that conversion "ą, ę, ś, ć" etc. To do that we wrote a function that does that and returns correct values. The issue comes when we try using it inside of iReport.
The query looks like this: SELECT CONVERT_NUMBER_TO_WORD(17908.80, 'PLN') FROM DUAL;
When we use it in SqlPlus we get this: "siedemnaście tysięcy dziewięćset osiem złotych i osiemdziesiąt groszy" - which is correct
But when we try to do the same in iReport, we get this: "siedemnacie tysi©cy dziewi©†set osiem zotych i osiemdziesiĄt groszy"
As you can see, when we get the data in iReport it seems to be using different encoding. It's displayed like that in the Preview Data inside query window, on the internal preview and on the PDF preview.
The reason why I'm lost at this point is because if we try selecting ANY other data that resides in a table, we get correct encoding, the issue seems to only appear when we try to select data using a function (no matter what that function is, if it returns varchar2 it's not encoded properly).
Database: Oracle Database 12c Release 184.108.40.206.0 - 64bit
Problematic function: CREATE OR REPLACE FUNCTION CONVERT_NUMBER_TO_WORD(num IN NUMBER, curr IN VARCHAR2) RETURN VARCHAR2
Font (iReport): Arial.ttf (same for PDF)
Pdf encoding: Identity-H
We've tried looking for ways to set proper encoding so that data is fetched properly, but it seems that we are unable to do so :(