On 22/12/11 20:40, Bill Ward wrote:
Agreed. Any Oracle initialization environment variables need to be set
before your Perl script starts. Another approach is to set them and then
re-exec() from within the script ... though be careful to avoid infinitely
re-execing the same script!
This is not correct. With the script as written, no Oracle related code
is executed until connect time, so enviroment variables which are interpreted
by Oracle can be set any time before the first connect.
On the other hand, variables interpreted by the run-time loader, such as
LD_LIBRARY_PATH, must be set before perl itself is loaded. So, re-execing
is necessary for a change to LD_LIBRARY_PATH, but not, but not for a
change of NLS_LANG.
hello ralf
hello jens
Jens Rehsack schrieb:
[...]
We have a problem. We want to get an UTF8-CSV-File from
UTF8-Oracle-Database. It seems to be that the CSV-File is always charset
"latin-1". What can we do to get UTF-8-File?
Here is our Testscript.
#------ our Testscript--------------------**----#
#!/usr/local/bin/perl -w -C64 use strict;
[...]
$ENV{NLS_LANG}="GERMAN_**GERMANY.AL32UTF8";
[...]
I seem to remember that it's to late for the oracle-client libraries to
set NLS_LANG here inside the script - I guess at this time they are loaded
already and have finished initializing their charset, thus ignoring any
change in NLS_LANG.
try to set NLS_LANG before starting the script. either by "export"ing it
or by doing
NLS_LANG="GERMAN_GERMANY.**AL32UTF8" ./your-test-script
greetings
hermann
--
Charles Jardine - Computing Service, University of Cambridge
c...@cam.ac.uk Tel: +44 1223 334506, Fax: +44 1223 334679