BookmarkSubscribeRSS Feed
Daily1
Quartz | Level 8

 

/* Enable ODS PDF output */
ods pdf file="output.pdf";

/* Create a sample dataset with the currency symbol */
data example;
  indian_currency_symbol = '₹';
run;

/* Display the dataset in the PDF output */
proc print data=example;
run;

/* Close the ODS PDF output */
ods pdf close;

The Indian currency symbol '₹' is not displayed in the PDF output.

 

output

Daily1_0-1695373704197.png

 

 

4 REPLIES 4
SASJedi
SAS Super FREQ

I believe the default style for PDF (Pearl) is at fault. When I ran your code using the Daisy style (my preferred style for PDF output), the results were appropriately displayed in the PDF:

ods pdf file="output.pdf" style=daisy;

/* Create a sample dataset with the currency symbol */
data example;
  indian_currency_symbol = '₹';
run;

/* Display the dataset in the PDF output */
proc print data=example;
run;

/* Close the ODS PDF output */
ods pdf close;
Check out my Jedi SAS Tricks for SAS Users
Daily1
Quartz | Level 8

Daily1_0-1695386167187.png

Not working that code . u have any template and other thing pls provide

Tom
Super User Tom
Super User

Trying to put non-ASCII characters into the code in lines like:

 indian_currency_symbol = '₹';

leaves you at the mercy of the encoding being used by your editor and your SAS session.

 

If you are using a single byte encoding that does not reserve one of the possible 256 values that a single byte can contain for the glyph then it cannot be printed.

 

Check the setting of the ENCODING option in your SAS session.

%put %sysfunc(getoption(encoding));

Make sure it is using UTF-8 (or some other encoding that has that symbol in it).  If not then you need to use a SAS session that does have a code that display that symbol.  

 

Once you figure out the hexcode needed to display that character in the encoding you are using then use that hexcode in your SAS code instead of the literal quoted character will make the SAS program more portable.  So if you want to use the hexcode for UTF-8 encoding then use:

indian_currency_symbol='E282B9'x ;

You also need to make sure the FONT you are using to write your PDF file can display that symbol.

sas-innovate-2024.png

 

Secure your spot at the must-attend AI and analytics event of 2024: SAS Innovate 2024! Get ready for a jam-packed agenda featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events.

 

Register by March 1 to snag the Early Bird rate of just $695! Don't miss out on this exclusive offer. 

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 4 replies
  • 629 views
  • 2 likes
  • 4 in conversation