Is there any function that can do magic converting the string 'Comunicación 1 año' back to its origin
'Comunicación 1 año'.
That does not work but looks promising.
data test;
length instr $50;
length str1 str2 str3 str4 str5 str6 str7 str8 $ 50;
instr = "SAS" ||"ae"x || " Comunicación 1 año";
put instr;
str1 = kpropdata(instr, 'UESC','utf-8');
put str1= +2 str1= $hex34.;
str2 = kpropdata(instr,'TRIM','utf-8');
put str2= +2 str2= $hex26.;
str3 = kpropdata(instr,'BLANK', 'utf-8');
put str3= +2 str3= $hex26.;
str4 = kpropdata(instr,'?', 'utf-8');
put str4= +2 str4= $hex26.;
str5 = kpropdata(instr,'hex', 'utf-8');
put str5= +2 str5= $hex26.;
str6 = kpropdata(instr,'TRUNC', 'utf-8');
put str6= +2 str6= $hex26.;
str7 = kpropdata(instr,'REMOVE', 'utf-8');
put str7= +2 str7= $hex26.;
str8 = kpropdata(instr,'NCR', 'utf-8');
put str8= +2 str8= $hex26.;
run;
KCVT().
data test;
have='Comunicación 1 año';
expect= 'Comunicación 1 año';
want = kcvt(have,'utf-8','wlatin1');
same=expect=want;
run;
KCVT().
data test;
have='Comunicación 1 año';
expect= 'Comunicación 1 año';
want = kcvt(have,'utf-8','wlatin1');
same=expect=want;
run;
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.
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.