BookmarkSubscribeRSS Feed
Eva
Quartz | Level 8 Eva
Quartz | Level 8
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
3 REPLIES 3
Cynthia_sas
SAS Super FREQ
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]
Eva
Quartz | Level 8 Eva
Quartz | Level 8
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
Cynthia_sas
SAS Super FREQ
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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 1459 views
  • 0 likes
  • 2 in conversation