BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi,

I have created a data set with some Swedish words containing national characters like å, ö and ä. In the output window in SAS, these characters are displayed correctly but when I create ods rtf output and open the rtf file in Word or WordPad they turn into Ã¥, ö and ä.

Do I need to change some settings or is there anything else I can do to solve this problem?

Thanks,

Helle
3 REPLIES 3
Olivier
Pyrite | Level 9
The following code works out fine on my computer.
Things you can check :
- what's the value of your "Locale" SAS system option ? (try SWEDISH as a value)
- try adding a TRANTAB=ASCII option to your ODS RTF opening statement
- are you using (options in the procedure, Template style) some sort of special font in which those characters would not display (copy your SAS Output and paste into Word, then change the font to the one you would like to use : is it correctly displayed) ?

By the way, what SAS version are you using ?

Olivier

My testing code is
[pre]
DATA work.swedish ;
INFILE CARDS DLM = "/" ;
INPUT name :$20. ;
CARDS ;
esbjørn svensson
per äkerman
pål andersson
;
RUN ;
ODS RTF FILE = "c:\temp\sweeeeeeden.doc" ;
PROC PRINT ;
RUN ;
ODS RTF CLOSE ;
[/pre]
deleted_user
Not applicable
Hi Olivier

Thanks a lot for your advice. Unfortunately, neither of your suggestions solve my problem. I am using SAS 9.1 English with DBCS and Unicode support.

Helle
deleted_user
Not applicable
I found out that the solution is to add encoding=wlatin1 to the ODS rtf statement.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 661 views
  • 0 likes
  • 2 in conversation