The SAS Output Delivery System and reporting techniques

National characters become garbage in ods rtf output

Reply
N/A
Posts: 0

National characters become garbage in ods rtf output

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
Super Contributor
Posts: 260

Re: National characters become garbage in ods rtf output

Posted in reply to deleted_user
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]
N/A
Posts: 0

Re: National characters become garbage in ods rtf output

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
N/A
Posts: 0

Re: National characters become garbage in ods rtf output

Posted in reply to deleted_user
I found out that the solution is to add encoding=wlatin1 to the ODS rtf statement.
Ask a Question
Discussion stats
  • 3 replies
  • 145 views
  • 0 likes
  • 2 in conversation