jacek.hajdarowicz Posted October 25, 2016 Share Posted October 25, 2016 Hello,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 correctBut 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).Additional info:Database: Oracle Database 12c Release 12.1.0.1.0 - 64bitiReport: 5.6.0JDBC: ojdbc5.jarNLS_CHARACTERSET: AL32UTF8Problematic function: CREATE OR REPLACE FUNCTION CONVERT_NUMBER_TO_WORD(num IN NUMBER, curr IN VARCHAR2) RETURN VARCHAR2Font (iReport): Arial.ttf (same for PDF)Pdf encoding: Identity-HWe'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 :( Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now