2

Some time ago my PL/SQL stopped showing characters åäö.

I've tried reinstalling oracle_home_11g, PL/SQL cleaned the registry but the problem remains.

picture1 picture2

Anyone know why?

Lalit Kumar B
  • 47,486
  • 13
  • 97
  • 124
President Camacho
  • 1,860
  • 6
  • 27
  • 44

1 Answers1

3

Most probably it is due to the mismatch between the locale-specific NLS characterset and the database characterset. Or else, the NLS_LANG value is not correctly set in the OS environmental variable.

Have a look at Why are junk values/special characters/question marks displayed on my client?

  1. Your client charaterset doesn't match with database characterset.

You can compare between :

-- locale-specific characterset

select value
from   v$nls_parameters 
where  parameter = 'NLS_CHARACTERSET';


-- database characterset

select value
from   nls_database_parameters 
where  parameter = 'NLS_CHARACTERSET';

If you see a mismatch between the two, then set the locale-specific NLS characterset to that of database characterset.

  1. If the above charactersets match, then you need to set the NLS_LANG value in the OS environmental variable.

For Windows OS, the format is:

[NLS_LANGUAGE]_[NLS_TERRITORY].[NLS_CHARACTERSET]

Follow the instruction in the documentation regarding setting up the NLS_LANG : Setting the NLS_LANG Environment Variable for Oracle Databases

Lalit Kumar B
  • 47,486
  • 13
  • 97
  • 124
  • select value from v$nls_parameters UNION ALL select value from nls_database_parameters: 1 SWEDISH 2 SWEDEN 3 Kr 4 SWEDEN 5 ,. 6 GREGORIAN 7 RRRR-MM-DD 8 SWEDISH 9 WE8MSWIN1252 10 SWEDISH 11 HH24:MI:SSXFF 12 RRRR-MM-DD HH24:MI:SSXFF 13 HH24:MI:SSXFF TZR 14 RRRR-MM-DD HH24:MI:SSXFF TZR 15 € 16 AL16UTF16 17 BINARY 18 BYTE 19 FALSE 20 AMERICAN 21 AMERICA 22 $ 23 AMERICA 24 ., 25 WE8MSWIN1252 26 GREGORIAN 27 DD-MON-RR 28 AMERICAN 29 BINARY 30 HH.MI.SSXFF AM 31 DD-MON-RR HH.MI.SSXFF AM 32 HH.MI.SSXFF AM TZR 33 DD-MON-RR HH.MI.SSXFF AM TZR 34 $ 35 BINARY 36 CHAR 37 FALSE 38 AL16UTF16 39 11.2.0.3.0 – President Camacho Sep 12 '14 at 19:55
  • 1
    That is wrong, have a look at this [NLS_LANG FAQ](http://www.oracle.com/technetwork/products/globalization/nls-lang-099431.html#_Toc110410549) where is says: "B) `SELECT * from v$nls_parameters;` This view shows the current session parameters and the **DATABASE** characterset as seen in the NLS_DATABASE_PARAMETERS view." and "**The part of NLS_LANG is NOT shown in any system table or view.**" – Wernfried Domscheit Dec 09 '15 at 10:51
  • @WernfriedDomscheit I didn't get you. You are reiterating the same thing, as the answer and the FAQ. What's wrong? Where did I say that NLS_LANG value could be seen in v$ view? The former is at database level, and the latter is at OS level. – Lalit Kumar B Dec 09 '15 at 13:01
  • 1
    You write *You can compare between: -- locale-specific characterset select ... from v$nls_parameters; -- database characterset select ... from nls_database_parameters ... if you see mismatch...*. This imply these values could be different. However, according NLS_LANG FAQ both queries show the database character set and thus they can never be different. – Wernfried Domscheit Dec 09 '15 at 17:10
  • Not helping.... Both shows the same value. NLS_LANG is properly set on my Windows ; in registry. I even tried to set environment variable before launching SQLPlus but same result... I think your answer is not accurate – Jason Krs Jan 13 '18 at 08:43