Hi,
I have a problem displaying tilde characters in SQL*Plus correctly.
Environment is: Oracle Server 10.2.0.5 (yes, I know it is not supported anymore, but not possible to upgrade now).
Database parameters:
SQL> select * from nls_database_parameters order by parameter;
------------------------------ ----------------------------------------
NLS_CALENDAR | GREGORIAN |
NLS_CHARACTERSET | WE8MSWIN1252 |
NLS_COMP | BINARY |
NLS_CURRENCY | ? |
NLS_DATE_FORMAT | RR.MM.DD |
NLS_DATE_LANGUAGE | PORTUGUESE |
NLS_DUAL_CURRENCY | ? |
NLS_ISO_CURRENCY | PORTUGAL |
NLS_LANGUAGE | PORTUGUESE |
NLS_LENGTH_SEMANTICS | BYTE |
NLS_NCHAR_CHARACTERSET | AL16UTF16 |
NLS_NCHAR_CONV_EXCP | FALSE |
NLS_NUMERIC_CHARACTERS | ,. |
NLS_RDBMS_VERSION | 10.2.0.5.0 |
NLS_SORT | WEST_EUROPEAN |
NLS_TERRITORY | PORTUGAL |
NLS_TIME_FORMAT | HH24:MI:SSXFF |
NLS_TIME_TdZ_FORMAT | HH24:MI:SSXFF TZR |
NLS_TIMESTAMP_FORMAT | RR.MM.DD HH24:MI:SSXFF |
NLS_TIMESTAMP_TZ_FORMAT | RR.MM.DD HH24:MI:SSXFF TZR |
20 rows selected.
Data is inserted and displayed correctly through the application (Oracle forms 6 - yes, I know it's old and not supported anymore :-))
The only problem is that I cannot display "tilde a" or "tilde o" correctly when using SQL*Plus DOS Window connected to the database directly. Other accented characters display fine (acute accented a, for example).
If I use the Windows SQL*Plus available in 10.2 then all characters display correctly.
NLS_LANG and code page are correct.
SQL> host chcp
Active code page: 850
SQL> host echo %NLS_LANG%
american_america.we8pc850
SQL> select * from nls_session_parameters order by parameter;
PARAMETER VALUE
------------------------------ ----------------------------------------
NLS_CALENDAR GREGORIAN
NLS_COMP BINARY
NLS_CURRENCY $
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE PORTUGUESE
NLS_DUAL_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_LANGUAGE AMERICAN
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE
NLS_NUMERIC_CHARACTERS .,
NLS_SORT BINARY_AI
NLS_TERRITORY AMERICA
NLS_TIME_FORMAT HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
17 rows selected.
Bad displayed data:
SQL> select notas from atj_disc_cong where ref = 645; -- see attached screenshot Snap1.jpg
However, data is stored correctly:
SQL> select dump(notas) from atj_disc_cong where ref = 645;
DUMP(NOTAS)
--------------------------------------------------------------------------------
Typ=1 Len=21: 231,32,227,225,224,226,32,233,232,234,32,237,236,32,243,245,242,224,32,250,249
Also, if I copy the resulted badly displayed characters into Word, they appear fine (i.e., I get a properly tilde ã)
Any ideas why they are displayed incorrectly in SQL*Plus?
Thanks