Re: NLS_LANG

From: Laurenz Albe <invite_at_spam.to.invalid>
Date: Fri, 29 May 2009 08:40:28 +0200
Message-ID: <1243579250.775062_at_proxy.dienste.wien.at>


Gerard H. Pille wrote:
>>> Alas, we want to check if all PC's have been correctly configured, even all clients.
>>
>> As far as i know, it can't be done from within the Oracle server.
>> I guess, it should be done by os means, another difficulty may be in the term environment *variable*, i.e., it can be changed
>> every time by the client.
>
> Indeed, and we would like to prevent that. A client pretending to use the same character set as the database, can store quite
> some rubbish.

*sigh* You are so right about this.

Of course it is sometimes correct to have client encoding equal to server encoding, and there's no way to verify on the server side whether that is correct or not. There is not even a way to find out what the client encoding is.

I personally think that Oracle made two mistakes (I'd call them bugs):

  • They do not verify correctness of the data when client encoding is equal to serve encoding.
  • They do not report an error when a character conversion between different encodings fails, but silently store bad data ("replacement characters").

This all comes together with a third bug, namely that (at least up to Oracle 8) Windows clients were installed with the wrong NLS_LANG setting (WE8ISO8859P1) by default.

All this resulted in lots of corrupt databases.

Yours,
Laurenz Albe Received on Fri May 29 2009 - 08:40:28 CEST

Original text of this message