SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 51411: Oracle special characters might be displayed as question marks (?) in SAS®

DetailsAboutRate It

When different encoding methods are set for Oracle and SAS, Oracle special characters might be displayed as question marks in SAS. For example, the problem might occur if Oracle encoding is set to UTF-8 and SAS English session encoding is set to WLATIN1 (English).


To determine what your current SAS session encoding method is, use the OPTIONS procedure as shown here:

proc options option=encoding;
run;

The SAS log then displays the following information:

ENCODING=WLATIN1 Specifies default encoding for processing external data.

To determine the Oracle database encoding method, execute the following SQL query in Oracle:

select * from nls_database_parameters where parameter = 'NLS_CHARACTERSET';

The following is displayed:

PARAMETER                       VALUE
------------------------------ ----------------------------------------
NLS_CHARACTERSET                AL32UTF8

If you want Oracle data to be displayed in SAS (English), use the NLS_LANG parameter. NLS_LANG lets Oracle know what character set your client application is using so that Oracle can convert from the client's character set to the database character set, when needed. Here is an example:

AMERICAN_AMERICA.WE8MSWIN1252

For instructions about how to set NLS_LANG environment variable, see SAS Note 18688, "Data in a local language other than English might not be displayed correctly when you import the data from an Oracle database into SAS® software." 

 



Operating System and Release Information

Product FamilyProductSystemSAS Release
ReportedFixed*
SAS SystemSAS/ACCESS Interface to OracleMicrosoft® Windows® for 64-Bit Itanium-based Systems
Microsoft Windows Server 2003 Datacenter 64-bit Edition
Microsoft Windows Server 2003 Enterprise 64-bit Edition
Microsoft Windows XP 64-bit Edition
Microsoft® Windows® for x64
OS/2
Microsoft Windows 8 Enterprise 32-bit
Microsoft Windows 8 Enterprise x64
Microsoft Windows 8 Pro 32-bit
Microsoft Windows 8 Pro x64
Microsoft Windows 8.1 Enterprise 32-bit
Microsoft Windows 8.1 Enterprise x64
Microsoft Windows 8.1 Pro
Microsoft Windows 8.1 Pro 32-bit
Microsoft Windows 95/98
Microsoft Windows 2000 Advanced Server
Microsoft Windows 2000 Datacenter Server
Microsoft Windows 2000 Server
Microsoft Windows 2000 Professional
Microsoft Windows NT Workstation
Microsoft Windows Server 2003 Datacenter Edition
Microsoft Windows Server 2003 Enterprise Edition
Microsoft Windows Server 2003 Standard Edition
Microsoft Windows Server 2003 for x64
Microsoft Windows Server 2008
Microsoft Windows Server 2008 R2
Microsoft Windows Server 2008 for x64
Microsoft Windows Server 2012 Datacenter
Microsoft Windows Server 2012 R2 Datacenter
Microsoft Windows Server 2012 R2 Std
Microsoft Windows Server 2012 Std
Microsoft Windows XP Professional
Windows 7 Enterprise 32 bit
Windows 7 Enterprise x64
Windows 7 Home Premium 32 bit
Windows 7 Home Premium x64
Windows 7 Professional 32 bit
Windows 7 Professional x64
Windows 7 Ultimate 32 bit
Windows 7 Ultimate x64
Windows Millennium Edition (Me)
Windows Vista
Windows Vista for x64
64-bit Enabled AIX
64-bit Enabled HP-UX
64-bit Enabled Solaris
ABI+ for Intel Architecture
AIX
HP-UX
HP-UX IPF
IRIX
Linux
Linux for x64
Linux on Itanium
OpenVMS Alpha
OpenVMS on HP Integrity
Solaris
Solaris for x64
Tru64 UNIX
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.