%macro utf8chr(ucs2);
kcvt(&ucs2, 'ucs2b', 'utf8');
%mend utf8chr;
%macro namechar(name, char);
name="&name"; code=upcase("&char"); char=%utf8chr("&char"x); output;
%mend namechar;
data uft8char;
length name $40;
%namechar(Registered Sign, 00AE);
%namechar(Cent Sign, 00A2);
%namechar(Pound Sign, 00A3);
%namechar(Currency Sign, 00A4);
%namechar(Yen Sign, 00A5);
%namechar(Rupee Sign, 20A8);
%namechar(Euro Sign, 20Ac);
%namechar(Dong Sign, 20Ab);
%namechar(Euro-currency Sign, 20A0);
%namechar(Colon Sign, 20A1);
%namechar(Cruzeiro Sign, 20A2);
%namechar(French Franc Sign, 20A3);
%namechar(Lira Sign, 20A4);
run;
options printerpath=(gif out) device=sasprtc;
filename out 'utf8.gif';
ods printer style=utf8_style;
proc print;
run;
ods printer close;
Note: If you get an “unable to write to template store” error when running this code,
place the following before the proc step:
PROC TEMPLATE step:
ODS PATH work.templat(update) sasuser.templat(read)
sashelp.tmplmst(read);
This statement causes the templates to be written to the WORK library where the
server has Read and Write access.
Using Fonts with Universal Printers and SAS/GRAPH Devices 299