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: Help Need Pounds....

Re: Help Need Pounds....

From: Alex Hudghton <alex.hudghton_at_capgemini.co.uk>
Date: Fri, 08 Jan 1999 08:39:37 +0000
Message-ID: <3695C448.4D32898@capgemini.co.uk>


From Oracle Support (UK) for a recent problem with £ signs Regards
Alex

> > ----------
> > From: hmoston[SMTP:ORANOTES_at_UK.oracle.com]
> > Sent: 08 September 1998 12:01
> > To: Hudghton, Alex
> > Cc: HMOSTON_at_UK.oracle.com
> > Subject: How to Get Pound Signs in Your Database
> >
> > Article-ID:
> > Circulation: REVIEWED (INTERNAL)
> > Folder: NLS
> > Topic: * Using NLS
> > Platform: GENERIC Generic issue
> > Subject: How to Get Pound Signs in Your Database
> > Author: TOSCROFT.UK
> > Modified-Date: 18-AUG-1998 16:26:06
> > Document-Type: BULLETIN
> > Impact: MEDIUM
> > Skill-Level: NOVICE
> > Content-Type: TEXT/PLAIN
> > Attachments: NONE
> >
> > WHAT TO DO IF YOU WANT POUND SIGNS IN YOUR DATABASE
> >
> > Introduction:
> >
> > Oracle Customer Support receives many calls asking how to store pound
> > signs
> > in an Oracle database or, unfortunately, what to do when pound signs
> > already
> > stored in the database have been lost. This document aims to help
> > clarify
> > how ORACLE7 handles pound signs.
> >
> > How Characters are Stored:
> >
> > All characters in the Western languages are stored as a single byte
> > in the database ie: mapping to a value between 0-255. Which character
> > maps to which value depends on the character set.
> >
> > The default character set with which an ORACLE7 database is created is
> > US7ASCII
> > which contains characters in ascii positions 0-127 ie: the top 7 bits.
> > US7ASCII
> > is also the default character set for NLS_LANG, the environment
> > variable
> > which
> > controls the appearance (in national language terms) of your data. The
> > fact
> > that there are only character mappings for ascii values 0-127 does not
> > mean
> > that the 8th bit is not stored, just that it is not defined (see
> > Bulletin
> > 105599.691 NLS 7-BIT/8-BIT Discussion for further information on
> > this).
> >
> > Storing Pound Signs:
> >
> > The pound sign is not defined in the US7ASCII character set but is in
> > many of
> > the 8-bit character sets such as WE8ISO8859P1 and WE8DEC. In these
> > character
> > sets it is defined as mapping to ascii value 163. To be able to see
> > and
> > manipulate the pound sign, therefore, the database needs to be created
> > with
> > one of the 8-bit character sets (usually WE8ISO889P1 on Unix) and the
> > environment variable, NLS_LANG, needs to be set to the 8-bit
> > character set
> > supported by your terminal. In this way the pound sign you input on
> > the
> > client side can be correctly translated to a pound sign in the
> > database.
> >
> > To have the pound sign as the default currency on the client side you
> > also
> > need to set the territory part of the NLS_LANG environment variable
> > (language_territory.characterset) to United Kingdom eg:
> >
> > setenv NLS_LANG "AMERICAN_UNITED KINGDOM.WE8ISO8859P1"
> >
> > (the double quotes are because of the space between United and
> > Kingdom).
> >
> > NLS_LANG should be set:
> >
> > on Unix Clients - as an environment variable
> > on 16 bit Windows Clients - in the oracle.ini
> > on 32 bit Windows Clients - in the Windows registry
> >
> >
> > Where Problems Occur:
> >
> > In many cases, customers have databases set up with the default
> > character set
> > and in a default environment but are still able to insert and retrieve
> > pound signs without problems. This is because character translation
> > only
> > occurs when the client and server character sets are different. With
> > both
> > set to US7ASCII the nls layer is bypassed therefore the values
> > characters
> > are mapped to are not translated. If the terminal displays pound
> > signs, then
> > it will be mapping it to an ascii value over 127, usually 163 and this
> > is the
> > value which will be stored in the database.
> >
> > The problem occurs when any form of string processing is performed or
> > any
> > tools, such as export, are used. When this happens, the character set
> > is
> > checked and, as the 8th bit is not defined in US7ASCII, only 7 bits
> > will be
> > looked at. The 8th bit, which includes pound signs, will be stripped
> > out.
> > The
> > value displayed where a pound sign should be will be #. If the
> > database does
> > have an 8 bit character set but the NLS_LANG is set to US7ASCII then
> > the
> > pound
> > sign is converted to a replacement character, '?', as there is no
> > valid value
> > to map it to.
> >
> > In the case of an export the pound signs (or any other character
> > mapping to
> > a value over 127) will not be in the export file so once the original
> > data
> > has been destroyed it will be impossible to retrieve the pound signs.
> > It is
> > essential therefore to make sure that the database character set and
> > the
> > NLS_LANG character set are set correctly before an export is
> > performed.
> >
> > In Summary:
> >
> > To store and display pound signs in ORACLE7 you need:
> >
> > 1. to have a terminal which displays pound signs
> > 2. to have a database character set which has a mapping for pound
> > signs,
> > such as WE8ISO8859P1
> > 3. to have NLS_LANG set to the correct character set for your terminal
> > which has a mapping for pound signs.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>

doyleja_at_logica.com wrote:

> Hi,
>
> I am using Oracle 7.3.4 on a Sequent Unix box.
> I need to change my NLS_CURRENCY to '£' as opposed to '#'.
> I cannot find a £ sign from my terminal as everything seems to be set up for
> USA.
> Can anyone tell me how to get a £ sign into NLS_CURRENCY.
>
> I have tried all sorts and any help would be much appreciated.
>
> Jeff Doyle.
Received on Fri Jan 08 1999 - 02:39:37 CST

Original text of this message

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