ponedjeljak, 10. lipnja 2013.

How to Convert Oracle Reports to UTF-8

One of the problems i faced recently is how to convert CP1250 (EE8MSWIN1250) codepage to UTF-8 codepage in Oracle Reports. Problem is  that Forms and Reports server is installed with NLS_LANG set to EE8MSWIN1250 with 5 applications consist of hundreds forms and reports. One smaller app need to execute reports with RUN_REPORT_OBJECT but in UTF-8 codepage.

One solution was to install separate Report Server with NLS_LANG set to UTF-8 but that requires more resources and licences.
My solution is to use GNU software called ICONV (http://www.gnu.org/software/libiconv/) which converts files to another code page.
First task is to create report (.XML) on report server with RUN_REPORT_OBJECT to some folder.
Than with host comand execute next batch script:

set PATH=D:\oracle\FRHome\jdk\bin;C:\Iconv\bin -- i use to copy all windows PATH to this variable
iconv -f CP1250 -t UTF-8 %1 > %2 -- %1 is source where CP1250 report is
                                                           -- %2 is where we put UTF8 report to

exit

After that i call Web.Show_document to show UTF-8 file in IE9.


Nema komentara:

Objavi komentar