Dear,
In my input dataset for a graph has following values. I used ods escapechar='~'; . The title statement and foot note are shown below. The unicode in footnote and title are resolved to ≥ as needed. But the dataset variable "value" unicode is not resolved. Please suggest. Thank you.
id value
1 ~{unicode 2265} 65 years
title1 age ~{unicode 2265} 61
footnote1 age~{unicode 2265} 61
Not sure if there is a way to use the same syntax as the TITLE statement uses.
But you can use a number of ways to enter unicode characters.
data test;
test='age ≥ 61';
output;
test='age ' || 'E289A5'x || ' 61';
output;
test=unicode('age \u2265 61');
output;
run;
Hi TOM,
Thank you for the help. how did you you the output your are showing. i am getting
| age = 61 |
Is your SAS session running with utf-8 encoding? Do a
proc options;
run;
and look for ENCODING in the log.
Thank you for your time. I think it is utf-8 encoding.
URLENCODING=SESSION
Specifies whether the argument to the
URLENCODE function and to the URLDECODE
function is interpreted using the SAS
session encoding or UTF-8 encoding.
Hi ,
I used this "~{unicode '2265'x}" it resolved. i got the output i need. Thank you very much
That doesn't get the unicode into the variable, but it does show it on the output.
Make sure to make the variable long enough since instead of the simple 3 bytes needed for that unicode character you will need to store the all of those other characters instead. The ~ (tilda) and the curly brackets and the string unicode and the digits 2265.
data test;
length test $80;
test='age ≥ 61';
output;
test='age ' || 'E289A5'x || ' 61';
output;
test=unicode('age \u2265 61');
output;
test="age ~{unicode 2265} 61";
output;
run;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.
Ready to level-up your skills? Choose your own adventure.