Re: oracle characters strange problem

From: Laurenz Albe <invite_at_spam.to.invalid>
Date: 16 Feb 2006 07:41:03 GMT
Message-ID: <1140075662.18519_at_proxy.dienste.wien.at>


amitkr.3_at_gmail.com wrote:

[was wondering why CHR(35) != CHR(163)]

> Ok... My DB's NLS_CHARATERSET is USASCII7 .....
>
> Can this explain the behavior...

I guess that your original query (SELECT ... MINUS ...) will return a non-empty result regardless of the database character set, the only difference being how the result is displayed. I cannot verify this statement since I have only ISO8859-1 and UTF-8 databases at hand.

You will notice that 35 + 128 = 163, and USASCII7 only uses the lower 7 bits to represent a character, and obviously Oracle chose to _display_ characters above 127 the same as the corresponding character with the highest bit off.

I emphasize the 'display' above because although the characters are displayed alike, they still are different. This explains the behaviour you observed.

There is admittedly some guesswork in what I said, so if anybody can correct or confirm what I've said, please do so.

Yours,
Laurenz Albe Received on Thu Feb 16 2006 - 08:41:03 CET

Original text of this message