Hello, I have an xml file which contains emoji and I looking for a Unix or a SAS solution the remove those from the original xml file before making any treatment on it.
Does someone already works on that topic.
Regards
@alepage wrote:
Hello, I have an xml file which contains emoji and I looking for a Unix or a SAS solution the remove those from the original xml file before making any treatment on it.
Does someone already works on that topic.
Regards
Exactly what character is it? What is the hexcode?
For example is it a smiley face?
data test;
emoji = 'F09F988A'x ;
run;
proc print;
run;
Once you know what character you are looking for try reading through the file and changing it to something else.
data _null_;
infile 'bad.xml';
file 'good.xml';
input;
_infile_ = tranwrd('F09F988A'x,':)');
put _infile_;
run;
Note if any of the lines in the XML are longer than 32K bytes then the code to find and replace the "emoji" character(s) will need to be more complicated.
Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.
Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.