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: charset problem with '¤' ?

Re: charset problem with '¤' ?

From: Dave <solomons_dad.w.marks_and_whom_at_oracle.com>
Date: Tue, 30 Aug 2005 10:49:34 +0100
Message-ID: <qbWQe.6$XW.35@news.oracle.com>


Sam wrote:
> Hello
>
> I have a problem which looks like a problem
> of charset with my Oracle 9.2 instance.
>
> I perform a select '¤' from dual and it gives me '¿'.
>
> Here's the result of a select * from nls_database_parameters:
> PARAMETER VALUE
> ------------------------------ ---------------------------------
> NLS_LANGUAGE AMERICAN
> NLS_TERRITORY AMERICA
> NLS_CURRENCY $
> NLS_ISO_CURRENCY AMERICA
> NLS_NUMERIC_CHARACTERS .,
> NLS_CHARACTERSET WE8ISO8859P15
> NLS_CALENDAR GREGORIAN
> NLS_DATE_FORMAT DD-MON-RR
> NLS_DATE_LANGUAGE AMERICAN
> NLS_SORT BINARY
> NLS_TIME_FORMAT HH.MI.SSXFF AM
>
> PARAMETER VALUE
> ------------------------------ ---------------------------------
> NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
> NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
> NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
> NLS_DUAL_CURRENCY $
> NLS_COMP BINARY
> NLS_LENGTH_SEMANTICS BYTE
> NLS_NCHAR_CONV_EXCP FALSE
> NLS_NCHAR_CHARACTERSET AL16UTF16
> NLS_RDBMS_VERSION 9.2.0.6.0
>
> In the windows registry, nls_lang is set to
> FRENCH_FRANCE.WE8MSWIN1252...
>
> Any idea ?
> Thanks,
> Samuel
>

Check out Locale Builder - it's a good tool for checking character definitions.

File->Open->By Object Name
select WE8MSWIN1252 (178) in the Character Set (ID) box select the Character Data Mapping tab
click View Code Chart
locate the ¤ - it's LocalChar value is 0xa4. click Close
File->Open->By Object Name
select WE8ISO8859P15
Character Data Mapping/View Code Chart
locate the ¤

...well, I couldn't find it. So you're asking Oracle to return a character it knows nothing about. You need to pick a server characterset that defines the characters you want to use, because Oracle only knows about characters in its characterset.

A nasty hack is to set the registry value to WE8ISO8859P15, then the NLS routines don't perform any translation, so the character should be returned unchanged (although Oracle will think it's returning the Euro symbol, which is 0xa4 in WE8ISO8859P15). This is a *NASTY HACK* and in no way guaranteed to work in all circumstances; you should only use characters defined by the characterset.

Dave. Received on Tue Aug 30 2005 - 04:49:34 CDT

Original text of this message

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