Usage Note 51053: DBCS characters might not be displayed correctly in PDF output created in a Unicode session
The default style that is used by ODS PDF is Styles.Pearl in SAS® 9.4, and Styles.Printer in SAS® 9.3 and earlier. These styles set default fonts for PDF output based on information in the SAS registry key ODS\FONTS, which is controlled by the SAS system option setting for LOCALE. If a SAS session is running with ENCODING=UTF8 and a LOCALE setting of EN_US, or another single-byte character set language locale, then double-byte characters might not be displayed correctly in the output that is created by ODS PDF.
In SAS 9.4, a sans-serif Unicode font, Arial Unicode MS, is available, as well as a serif Unicode font, Times New Roman Uni. Prior to SAS 9.4, the SAS font Thorndale Duospace WT J supports double-byte character set (DBCS) characters and should be used in a customized style to display DBCS characters in PDF output.
The sample code on the Full Code tab shows how to create a customized style that displays DBCS characters correctly in a SAS session with encoding set to UTF8.
Operating System and Release Information
SAS System | SAS Drug Development | 64-bit Enabled Solaris | 3.5 | | 9.2 TS2M3 | |
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 | |
Windows Vista for x64 | | | 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 sample code below creates a style called STYLES.DBCSCHAR that sets the style for all but the monospaced output (created by PROC COMPARE and DATA _NULL_ FILE PRINT) to use the MT Serif Unicode font. In SAS 9.4, <MTserif-unicode> correlates to Times New Roman Uni via the SAS registry, and <MTsans-serif-unicode> is an option to obtain the sans-serif font, Arial Unicode MS. In SAS 9.3 and earlier, <MTserif-unicode> correlates to Thorndale Duospace WT J. However, no sans-serif Unicode font is shipped with releases prior to SAS 9.4. If desired,
SAS Note 49453 shows how to make a customized style the default style for the PDF destination.
ods path (append) work.template(update) ;
proc template;
define style styles.dbcschar;
parent=styles.pearl; /* use styles.printer in SAS 9.3 and earlier */
class fonts /
'docFont' = ("<MTserif-unicode>",8pt)
'headingFont' = ("<MTserif-unicode>",9pt,Bold)
'headingEmphasisFont' = ("<MTserif-unicode>",9pt,Bold Italic)
'FixedFont' = ("Courier",7pt)
'BatchFixedFont' = ("SAS Monospace, Courier",5pt)
'FixedHeadingFont' = ("Courier",7pt,Bold)
'FixedStrongFont' = ("Courier",7pt,Bold)
'FixedEmphasisFont' = ("Courier",7pt,Italic)
'EmphasisFont' = ("<MTserif-unicode>",8pt,Italic)
'StrongFont' = ("<MTserif-unicode>",8pt,Bold)
'TitleFont' = ("<MTserif-unicode>",11pt,Bold)
'TitleFont2' = ("<MTserif-unicode>",10pt);
class Graphfonts /
'GraphDataFont' = ("<MTserif-unicode>",7pt)
'GraphUnicodeFont' = ("<MTserif-unicode>",9pt)
'GraphValueFont' = ("<MTserif-unicode>",9pt)
'GraphLabelFont' = ("<MTserif-unicode>",10pt)
'GraphFootnoteFont' = ("<MTserif-unicode>",10pt)
'GraphTitleFont' = ("<MTserif-unicode>",11pt,bold)
'GraphAnnoFont' = ("<MTserif-unicode>",10pt);
end;
run;
/* Take a look in the log at the registry
settings for the fonts used by ODS PDF */
proc registry list startat="ODS\FONTS";
run;
data test;
xxx ='テスト';
label xxx='テスト';
run;
ods _all_ close;
options nodate nonumber orientation=portrait;
ods pdf file="test.pdf" style=styles.dbcschar notoc startpage=no;
proc report data=test nowd;
title "テスト";
footnote "テスト";
run;
ods graphics on / noborder;
proc sgplot data=sashelp.cars;
label cylinders="テスト" origin="テスト";
hbox cylinders / category=origin;
run;
ods pdf close;
Double-byte character set (DBCS) characters might not be displayed correctly in PDF output created in a Unicode session.
Date Modified: | 2013-10-08 10:32:45 |
Date Created: | 2013-09-13 09:38:03 |