The SAS Output Delivery System and reporting techniques

ODS PDF German Umlaut in title, footnote, legend

Reply
Regular Contributor
Regular Contributor
Posts: 156

ODS PDF German Umlaut in title, footnote, legend

Dear all,

I use ods pdf and with it title, footnote, legend. Text in these do not display correctly when I use a German Umlaut, e.g. ä,ö,ü.
I get some wired symols instead. When I use ods pdf text="ä" it works....
Yet there are places when I need to use title, footnote, legend.
Does anybody know how to diyplay these charcters correctly?

Best regards.
Eva
SAS Super FREQ
Posts: 8,743

Re: ODS PDF German Umlaut in title, footnote, legend

Hi:
When I run this code in SAS 9.2 on Windows (after I insert umlauts in the data), I see the umlaut in the tabular output from PROC PRINT and in the LEGEND, TITLE and FOOTNOTE from PROC GCHART...using ODS PDF and the default template for PDF.

Perhaps you are having a font issue and a font with umlauts is not available, even though the data has umlauts. Or, it could be an NLS issue with system settings. This may be an issue for Tech Support. If you run the code below and do NOT see umlauts in the output, then I would recommend opening a track with Tech Support for more help.

cynthia
[pre]

** put some umlauts in the data so they will be in the legend;
** and in the report as well;
data shoes;
set sashelp.shoes;
where region in ('Asia', 'Pacific', 'Canada') and
product contains 'Women';
region = translate(region,'ä','a');
region = translate(region,'Ä','A');
region = translate(region,'ë','e');
region = translate(region,'ö','o');
region = translate(region,'ü','u');
product = translate(product,'Ä','A');
product = translate(product,'ä','a');
product = translate(product,'ë','e');
product = translate(product,'ö','o');
product = translate(product,'ü','u');
run;

data class;
set sashelp.class;
name = translate(name,'ä','a');
name = translate(name,'ë','e');
name = translate(name,'ö','o');
name = translate(name,'ü','u');
run;

ods listing close;
ods pdf file='c:\temp\umlaut_grf.pdf';

proc print data=class;
title 'This is my title: ä ë ö ü Ä Ë Ö Ü';
footnote 'This is my footnote: ä ë ö ü Ä Ë Ö Ü';
run;
ods pdf text='This is my other text: ä ë ö ü Ä Ë Ö Ü';

proc gchart data=shoes;
title 'This is my title: ä ë ö ü Ä Ë Ö Ü';
footnote 'This is my footnote: ä ë ö ü Ä Ë Ö Ü';
vbar product / subgroup=region sumvar=sales legend;
run;
quit;
ods pdf close;
title; footnote;

[/pre]
Regular Contributor
Regular Contributor
Posts: 156

Re: ODS PDF German Umlaut in title, footnote, legend

Dear Cythia,

your example works in my system (I use SAS 9.1).
But I still had problems with graphs.

Then I found the solution. I user ftext=swiss1. That's ok für HTML output. But for PDF output I now use ftext="Helvetica" and now the umlate are displayed correctly.

Best regards,
Eva
SAS Super FREQ
Posts: 8,743

Re: ODS PDF German Umlaut in title, footnote, legend

Hi, Eva:
When you move to SAS 9.2, you will be able to get the umlaut automatically without using SWISS1-- since the font rendering and fonts available have been improved between 9.1 and 9.2.

I'm glad you got it working.
cynthia
Ask a Question
Discussion stats
  • 3 replies
  • 440 views
  • 0 likes
  • 2 in conversation