Usage Note 35559: Use the inline style function UNICODE to insert special characters in the ODS MARKUP destinations
There are often symbols such as Greek letters or mathematical symbols needed outside of typical text to enhance the meaning of SAS output. The UNICODE inline style function available in SAS 9.2 provides a direct way to insert these characters.
The sample code in the Full Code tab shows the insertion of several Greek letters, as well as the ≤ (less than or equal to) symbol using PROC PRINT routed to ODS RTF and ODS PDF. This function can be used with any procedure or the DATA step which routes output to most ODS MARKUP destinations. The syntax is discussed
here.
For an alternative method valid for releases prior to, and including, SAS 9.2, see
SAS Note 24054.
Operating System and Release Information
| SAS System | Base SAS | z/OS | 9.2 TS1M0 | |
| Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.2 TS1M0 | |
| Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.2 TS1M0 | |
| Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.2 TS1M0 | |
| Microsoft Windows XP 64-bit Edition | 9.2 TS1M0 | |
| Microsoft® Windows® for x64 | 9.2 TS1M0 | |
| Microsoft Windows Server 2003 Datacenter Edition | 9.2 TS1M0 | |
| Microsoft Windows Server 2003 Enterprise Edition | 9.2 TS1M0 | |
| Microsoft Windows Server 2003 Standard Edition | 9.2 TS1M0 | |
| Microsoft Windows XP Professional | 9.2 TS1M0 | |
| Windows Vista | 9.2 TS1M0 | |
| 64-bit Enabled AIX | 9.2 TS1M0 | |
| 64-bit Enabled HP-UX | 9.2 TS1M0 | |
| 64-bit Enabled Solaris | 9.2 TS1M0 | |
| HP-UX IPF | 9.2 TS1M0 | |
| Linux | 9.2 TS1M0 | |
| Linux for x64 | 9.2 TS1M0 | |
| OpenVMS on HP Integrity | 9.2 TS1M0 | |
| Solaris for x64 | 9.2 TS1M0 | |
*
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.
The inline style function UNICODE allows any unicode character to be displayed in the ODS HTML, RTF, and PRINTER (PCL/PDF/PS) destinations. The sample code displays the IOTA, ALPHA, MU, and ZETA characters in the titles, and the ≤ symbol in the header text of the variable POP.
ods escapechar="^";
ods rtf file="unicode_symbols.rtf" style=sasdocprinter;
ods pdf file="unicode_symbols.pdf" style=sasdocprinter;
proc print data=sashelp.demographics(obs=20) noobs l;
var region pop;
label pop="TESTING ^{super ^{unicode 2264}}";
title 'Unicode IOTA is ^{unicode 03B9}';
title2 'Unicode ALPHA is ^{unicode alpha}';
title3 'Unicode MU is ^{unicode mu}';
title4 'Unicode ZETA is ^{unicode 0396}';
run;
ods _all_ close;
New for SAS 9.2, the inline style function UNICODE allows the direct insertion of special characters in the non-Listing destinations.
| Date Modified: | 2009-04-29 08:47:48 |
| Date Created: | 2009-04-14 22:23:34 |