Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SQL*Plus and character set - NLS_LANG ignored?

user12149152Mar 3 2015 — edited Mar 3 2015

My two Oracle databases contains data in norwegian, with scandinavian special characters.

This works fine in most clients (including the old Windows SQL*Plus) - but not in command line SQL Plus, where these characters get misrepresented.

One database runs in Oracle 10.1.0.2.0, the other in Oracle 11.2.0.3.0.

The first one has the following NLS settings:

NLS_LANGUAGE = NORWEGIAN

NLS_TERRITORY = NORWAY

NLS_CURRENCY = kr

NLS_ISO_CURRENCY = NORWAY

NLS_NUMERIC_CHARACTERS = ,

NLS_CHARACTERSET = WE8MSWIN1252

NLS_CALENDAR = GREGORIAN

NLS_DATE_FORMAT = DD.MM.RRRR

NLS_DATE_LANGUAGE = NORWEGIAN

NLS_SORT = NORWEGIAN

NLS_TIME_FORMAT = HH24.MI.SSXFF

NLS_TIMESTAMP_FORMAT = DD.MM.RRRR HH24.MI.SSXFF

NLS_TIME_TZ_FORMAT = HH24.MI.SSXFF TZR

NLS_TIMESTAMP_TZ_FORMAT = DD.MM.RRRR HH24.MI.SSXFF TZR

NLS_DUAL_CURRENCY = Kr.

NLS_COMP = BINARY

NLS_LENGTH_SEMANTICS = BYTE

NLS_NCHAR_CONV_EXCP = FALSE

NLS_NCHAR_CHARACTERSET = UTF8

NLS_RDBMS_VERSION = 10.1.0.2.0

The other one has these:

NLS_LANGUAGE = NORWEGIAN

NLS_TERRITORY = NORWAY

NLS_CURRENCY = kr

NLS_ISO_CURRENCY = NORWAY

NLS_NUMERIC_CHARACTERS = ,

NLS_CHARACTERSET = WE8MSWIN1252

NLS_CALENDAR = GREGORIAN

NLS_DATE_FORMAT = DD.MM.RRRR

NLS_DATE_LANGUAGE = NORWEGIAN

NLS_SORT = NORWEGIAN

NLS_TIME_FORMAT = HH24.MI.SSXFF

NLS_TIMESTAMP_FORMAT = DD.MM.RRRR HH24.MI.SSXFF

NLS_TIME_TZ_FORMAT = HH24.MI.SSXFF TZR

NLS_TIMESTAMP_TZ_FORMAT = DD.MM.RRRR HH24.MI.SSXFF TZR

NLS_DUAL_CURRENCY = Kr.

NLS_COMP = BINARY

NLS_LENGTH_SEMANTICS = BYTE

NLS_NCHAR_CONV_EXCP = FALSE

NLS_NCHAR_CHARACTERSET = AL16UTF16

NLS_RDBMS_VERSION = 11.2.0.3.0

For none of these two databases SQL Plus returns scandinavian/special characters correctly when I select from the tables (varchar2 fields, clob etc.).

And the other way around: If I update the tables by entering data with scandinavian characters in SQL Plus, they are not entered correct into the tables.

In my local Windows environment, I wondered if the problem was the NLS_LANG setting, which initially read NORWEGIAN_NORWAY.WE8ISO8859P1.

I have tried changing the setting to NORWEGIAN_NORWAY.WE8MSWIN1252, but it makes no difference in SQL Plus.

What else can make a difference to what is displayed in SQL Plus?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 31 2015
Added on Mar 3 2015
2 comments
3,145 views