in reply to Re: Re: DBI returns NULL characters in string
in thread DBI returns NULL characters in string

I just spotted this little tidbit in Programming the Perl DBI on page 299:

The NVARCHAR2 and NCHAR variants hold string values of a defined national character set (Oracle 8 only). For those types the maximum number of characters stored may be lower when using multibyte character sets.

...

Oracle automatically converts character data between the character set of the database defined when the database was created and the character set of the client, defined by the NLS_LANG parameter for the CHAR and VARCHAR2 types or the NLS_NCHAR parameter for the NCHAR and NVARCHAR2 types.

CONVERT(string, dest_char_set, source_char_set) can be used to convert strings between character sets... See the "National Language Support" section of the Oracle Reference Manual for more details on character set issues.

I have a hunch that the difference between the two environments has something to do with the NLS_LANG and/or NLS_NCHAR parameters. (Disclaimer: I am not a dba, so I could be barking up the wrong tree.)

  • Comment on Re: Re: Re: DBI returns NULL characters in string

Replies are listed 'Best First'.
Re: Re: Re: Re: DBI returns NULL characters in string
by Anonymous Monk on Apr 26, 2001 at 22:03 UTC
    You are correct, it is the NLS_LANG parameter that caused my grief. I am working on a development/test server and my DBA recently deleted the directory that NLS_LANG pointed at, in order to prepare to load Oracle 9i. The CGI scripts apparently work OK since that web server was last started when the directory still existed.
    A thousand thank yous.