From: Stefano B. <sbo...@gm...> - 2011-05-27 11:14:00
|
hi guys I trying to use Rlib for generating report against a postgres db. I generated the xml report file from an example, written down a perl procedure using the examples (perl and php) but when I execute the procedure I got following error : Setting locale to [LC_CTYPE=it_IT.UTF-8;LC_NUMERIC=C;LC_TIME=it_IT.UTF-8;LC_COLLATE=it_IT.UTF-8;LC_MONETARY=it_IT.UTF-8;LC_MESSAGES=it_IT.UTF-8;LC_PAPER=it_IT.UTF-8;LC_NAME=it_IT.UTF-8;LC_ADDRESS=it_IT.UTF-8;LC_TELEPHONE=it_IT.UTF-8;LC_MEASUREMENT=it_IT.UTF-8;LC_IDENTIFICATION=it_IT.UTF-8] FAILED encoding is NULL or invalid [C]... using en_US *( why rlib has failed to set the locale ? using locale dialect is very important for us where all text into db are UTF-8)* Could Not Load POSTGRES Input [/usr/local/lib/libr-postgres.so: undefined symbol: g_free] * ( I checked into the path and the library exist, now we using postgersql vesrione 9.0)* rlib_add_query_as: Could not find input source [otrsprova]! Error.. datasource [otrsprova] does not exist No queries added to report Following the test perl procedure : #!/usr/bin/perl -w use rlib ; $PgConnect="host=localhost dbname=otrs user=otrs password=' ' "; $r = rlib::rlib_init(); rlib::rlib_add_datasource_postgres($r, "otrsprova", $PgConnect); rlib::rlib_add_query_as($r, "otrsprova", "select id, name from general_catalog", "gencat"); rlib::rlib_set_locale($r, "it_IT"); rlib::rlib_set_datasource_encoding($r, "otrsprova", "UTF-8"); rlib::rlib_set_output_encoding($r, "UTF-8"); rlib::rlib_add_report($r, "provaotrs.xml"); rlib::rlib_set_output_format_from_text($r, "TXT"); rlib::rlib_execute($r); rlib::rlib_spool($r); rlib::rlib_free($r); exit 0; Using Rlib would resolve some limitations we have using other package, hope you would help me. best regards -- * Stefano Boccanera* |