![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Is there any way to determine the NLS_LANG of a client using SQL or PL/SQL. sys_context('USERENV','LANGUAGE') gives the database characterset, not the clients. Thanks, Gerard |
#3
| |||
| |||
|
|
Gerard H. Pille schrieb: Is there any way to determine the NLS_LANG of a client using SQL or PL/SQL. sys_context('USERENV','LANGUAGE') gives the database characterset, not the clients. Thanks, Gerard For local connections ( also using bequeth protocol) you can get the environment variables with dbms_system.get_env procedure. Best regards Maxim |
#4
| |||
| |||
|
|
Maxim Demenko schreef: Gerard H. Pille schrieb: Is there any way to determine the NLS_LANG of a client using SQL or PL/SQL. sys_context('USERENV','LANGUAGE') gives the database characterset, not the clients. Thanks, Gerard For local connections ( also using bequeth protocol) you can get the environment variables with dbms_system.get_env procedure. Best regards Maxim Alas, we want to check if all PC's have been correctly configured, even all clients. |
#5
| |||
| |||
|
|
Gerard H. Pille schrieb: Maxim Demenko schreef: Gerard H. Pille schrieb: Is there any way to determine the NLS_LANG of a client using SQL or PL/SQL. sys_context('USERENV','LANGUAGE') gives the database characterset, not the clients. Thanks, Gerard For local connections ( also using bequeth protocol) you can get the environment variables with dbms_system.get_env procedure. Best regards Maxim 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. Best regards Maxim |
#6
| ||||
| ||||
|
|
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. |
|
- 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. |
#7
| |||
| |||
|
|
No they cannot. And as long as path to equals path from, no one is going to see any changes. If you want to store the character 'A', and you do it by translating into something you do not recognize, and get it back, and it is still represented as 'A', how can that be wrong?!? Somethimes, the thing you stored (and did not recognize) is encrypted. Sometimes, a client with another nls setting than what you *expected* entered the character. Think EBCDIC, for a change. |
#8
| |||||
| |||||
|
|
A client pretending to use the same character set as the database, can store quite some rubbish. No they cannot. And as long as path to equals path from, no one is going to see any changes. If you want to store the character 'A', and you do it by translating into something you do not recognize, and get it back, and it is still represented as 'A', how can that be wrong?!? |
|
Somethimes, the thing you stored (and did not recognize) is encrypted. Sometimes, a client with another nls setting than what you *expected* entered the character. Think EBCDIC, for a change. |
|
- They do not verify correctness of the data when client encoding is equal to serve encoding. Eh? data has nothing to do with nls_lang. Besides, define correct. |
|
- They do not report an error when a character conversion between different encodings fails, but silently store bad data ("replacement characters"). It does not fail - it simply ends up in another character code. Other dimension of same world. |
|
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. Perhaps in some code points being off - not corrupt databases. Corrupt is too large a word here. |
#9
| |||
| |||
|
|
For example: Both Note 14786.1 and Note 341676.1 agree that code point hex 0x80 is not assigned in the WE8ISO8859P1 character set. Yet Oracle will happily accept this byte when you feed it to the client. This is what I complain about. |
![]() |
| Thread Tools | |
| Display Modes | |
| |