Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: NLS_LANG client problem

Re: NLS_LANG client problem

From: Anurag <avdbi_at_hotmail.com>
Date: Wed, 24 Jul 2002 08:07:03 -0400
Message-ID: <ujt63bf5t89aa9@corp.supernews.com>


Fernando,

Due to my inexperience with php, I can only guess.

I assumed that php db interface works like perl. Perl uses a Interface called DBI + DBD:Oracle which itself (AFAIK) uses the Oracle OCI library. Also, it uses the NLS_LANG variable to determine what Language/character setting the client is using. Java thin driver however does not use the NLS_LANG setting .... AFAIK, it talks to the server and assumes that character setting.

Thus, you need to take into account two things: * Determine what characterset the data being input is in. If I have a

   UTF8 data which I try to insert in perl using a WE8ISO..    NLS_LANG setting, I might see garbled data being inserted. * Determine how the php interface is inserting data .. i.e. does it

   use the NLS_LANG?

To me it appears that either your data is not in WE8I... charset ... or ... if php uses NLS_LANG .. the env variable is not set (which you said was not the case .. i.e. it is set)

Also, What is the characterset of your database? WE8I.. or UTF8 .. or ...? Maybe some php guru can comment on this?

Anurag

"Fernando Donate" <fernandodonate_at_yahoo.es> wrote in message news:b0aa0c3a.0207240042.42ca8e88_at_posting.google.com...
> The WEb (Apache) User and the oracle user has the same environment
> variables. With both users, from sqlplus, I can insert and get words
> with á,é,etc, but not from a php web page.
>
> Any idea?
> Thanks
>
> "Anurag" <avdbi_at_hotmail.com> wrote in message news:<ujqi24bmmj6kd5_at_corp.supernews.com>...
> > I don't know php ... but you should understand that:
> > * Setting NLS_LANG for oracle user will set it for only that user.
> > * Thus you need to make sure that the web user has this same envioronment variable set.
> >
> > Anurag
> >
> > "Fernando Donate" <fernandodonate_at_yahoo.es> wrote in message
> > news:b0aa0c3a.0207230321.3c7d7edd_at_posting.google.com...
> > > Hello list
> > >
> > > I have installed oracle client 9.0.1 in my Linux box.
> > > my ~oracle/.bash_profile:
> > >
> > > umask 022
> > > if [ -f ~/.bashrc ]; then
> > > source ~/.bashrc
> > > fi
> > >
> > > ORACLE_BASE=/usr/local/oracle
> > > export ORACLE_BASE
> > > ORA_NLS33=/usr/local/oracle/product/9.0.1/ocommon/nls/admin/data
> > > export ORA_NLS33
> > > NLS_LANG=SPANISH_SPAIN.WE8ISO8859P1
> > > export NLS_LANG
> > >
> > > But when I insert data in the oracle DB server , from a form web (php)
> > > that contains the 'ñ','á','é','í','ó' and 'ú' characteres, they don't
> > > appear well in the Server
> > >
> > > Is anything missing?
> > > Any missconfiguration?
> > >
> > > Thanks.
> > > Fernando
Received on Wed Jul 24 2002 - 07:07:03 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US