dragokranjcec Posted March 28, 2014 Share Posted March 28, 2014 I have a data stored in code page 852. How can I display it properly on Windows with iReport?I am accessing datasource through JDBC-ODBC bridge. Can I do code page conversion in iReport and how? Link to comment Share on other sites More sharing options...
hozawa Posted March 29, 2014 Share Posted March 29, 2014 Database encoding and jdbc client encoding is different. JDBC is Java so it's using UCS encoding. So, this isn't a problem with iReport but with your JDBC which is used to read data.Just set your client encoding to be UTF8. In Oracle, this is NLS_LANG. Check if there is something like that.FYI: check the following thread.http://nntp-archive.sybase.com/nntp-archive/action/article/%3C4e560cde$1@solutions.advantagedatabase.com%3E Link to comment Share on other sites More sharing options...
dragokranjcec Posted March 31, 2014 Author Share Posted March 31, 2014 The problem is not in iReport (or, more correctly, jasperReports), but it is not in JDBC either. From JDBC driver I get "correct" data - they are really in CP852. I mean, JDBC driver is not converting to Unicode, so my problem is not related with your link. What I need is just conversion of (some) string data columns, which came from database, in iReport, so that they are displayed in Windows CP1250. Strangely, solution like: new String($F{nPaket}.getBytes("cp852"), "Cp1250") where nPaket is field name, does'nt work - it converts, but wrong! Link to comment Share on other sites More sharing options...
dragokranjcec Posted April 1, 2014 Author Share Posted April 1, 2014 It turned out that solution is: new String($F{fieldname}.getBytes("Cp1250"), "cp852") however illogical it is. 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