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

Home -> Community -> Usenet -> c.d.o.server -> Re: SQLPUS and NLS_LANG

Re: SQLPUS and NLS_LANG

From: Michel Cadot <micadot{at}altern{dot}org>
Date: Wed, 14 Jun 2006 19:10:59 +0200
Message-ID: <44904322$0$12761$636a55ce@news.free.fr>

"FreeDBA" <p.hirth_at_gmail.com> a écrit dans le message de news: 1150299939.676137.88330_at_c74g2000cwc.googlegroups.com...

Michel Cadot a écrit :

> "FreeDBA" <p.hirth_at_gmail.com> a écrit dans le message de news: 1150296259.046778.61220_at_h76g2000cwa.googlegroups.com...
>
> Laurenz Albe a écrit :
>
> > FreeDBA <p.hirth_at_gmail.com> wrote:
> > > someone could tel me why
> > >
> > > When i exceute : SQL> select upper('é') from dual;
> > >
> > > I obtain various results according to the workstation or I carry out it
> > > !!!
> > >
> > > sometimes i obtain : é
> > >
> > > other times : E
> > >
> > > Thank's
> >
> > It's all explained in the Globalization Support Guide
> > http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14225/toc.htm
> >
> > You need to set NLS_LANG so that it matches the codepage that your client
> > operating system or program uses.
> >
> > Yours,
> > Laurenz Albe
>
> Onto the AIX,
> Operabk> /home/oracle#echo $NLS_LANG
> AMERICAN_AMERICA.WE8ISO8859P1
> <operabk> /home/oracle#sqlplus system/whenever_at_operabk
>
> SQL*Plus: Release 8.1.7.0.0 - Production on Wed Jun 14 16:43:00 2006
>
> (c) Copyright 2000 Oracle Corporation. All rights reserved.
>
>
> Connected to:
> Oracle8i Enterprise Edition Release 8.1.7.2.0 - Production
> JServer Release 8.1.7.2.0 - Production
>
> SQL> select 'é' from dual;
>
> 'É
> --
> é
>
> SQL>
>
>
> Onto WIndos
> C:\Documents and Settings\Administrateur>echo %NLS_LANG%
> AMERICAN_AMERICA.WE8ISO8859P1
>
> Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
>
>
> Connected to:
> Oracle8i Enterprise Edition Release 8.1.7.2.0 - Production
> JServer Release 8.1.7.2.0 - Production
>
> SQL> select 'é' from dual;
>
> '+'
> ---
> +
>
> SQL>
>
>
> Could you explain me ?
> Thank's
>
>
> In DOS you're not using WE8ISO9959P1 but another code page (check with "chcp").
> If you use sqlplusw.exe (real windows version), then you likely get your 'é'
> (I think your windows code page is 1252 which is a strict superset of P1).
>
> Regards
> Michel Cadot

In dos
set NLS_LANG=french_france.we8pc850
and now it's ok !!!!
so in dos the NLS_LANG is not used by SQLPLSU ?

I think you don't understand the meaning of NLS_LANG. It tells to Oracle which language/character set *you* use then it can transform what is inside the database to *your* language. In DOS, you use code page 850 so you have to set NLS_LANG to we8pc850. In Windows, you use code page 1252, so you have to set NLS_LANG to we8mswin1252. As this later one is a superset of 8859p1 and your database is in 8859p1 you can use 8859p1 instead but this is because *you*, the *client*, use a superset of the database one. Your client NLS_LANG is not related to the database character set or instance NLS parameters.

Regards
Michel Cadot Received on Wed Jun 14 2006 - 12:10:59 CDT

Original text of this message

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