5

SAS 9.4 M6 on a Unix server. SAS EG 8.1 client.

When reading data in SAS from Oracle (10g release 10.2.0.4.0), special characters like "é", "â" are stripped from their accent so we end up with "e", "a". The result is the same whether we use libname or proc sql pass through.

libname ken oracle path=u1 SCHEMA=KEN_DEVLP1 user=[user] PASSWORD=[pwd];

We need to be able to read and view data correctly with both UTF-8 and latin9 sessions.

The Oracle database NLS_CHARACTERSET is AL32UTF8 and the NLS_NCHAR_CHARACTERSET is AL16UTF16, obtained from

select * from nls_database_parameters where parameter like '%CHARACTERSET';

Any help is greatly appreciated.

Mark Stewart
  • 2,046
  • 4
  • 22
  • 32
FrankO
  • 61
  • 4

1 Answers1

3

The encoding= Option in your libname statement might fix this. This is easy to miss, as the keyword encoding is neither suggested nor highlighted, as opposed to the other keywords in the libname-statement.

Here is how my code looks when accessing a data from a WLATIN9 encoded oracle database from a UTF-8 encoded SAS-Session.

libname mylib oracle
path     = "mydb.bvch.ch"
schema   = MySchema
user     = MyUser
password = "MyPassword" 
access   = readonly
encoding ='utf8'
;
Martin Dreher
  • 1,514
  • 2
  • 12
  • 22