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 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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