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.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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