Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Currency Symbols
British Currency Pound Signs:
The British currency 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 British currency 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 British 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.character set) to United Kingdom. For example:
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
British
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 British 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 British pound signs, will be
stripped
out. The value displayed where a British 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 British 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 British 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
British 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.
John <jbraddon_at_bluecarrots.com> wrote in message
news:3825668e_2_at_news1.vip.uk.com...
> My database reports currency in $ but i need it in £, I've tried messing
> around with nls parameters in the init.ora but to no avail as i don't
really
> know what i should be doing. Any help would greatly appreciated.
>
> John
>
>
>
>
Received on Sun Nov 07 1999 - 11:41:58 CST
![]() |
![]() |