-1

I have table in SAS like below:

col1
----------
A꣟   
ABCóó
śdźcąę
...

Of course I have also many more columns in my table, but I need to remove accents from letters in above table , so as a result I need something like below:

col1
----------
AeLz 
ABCoo
sdzcae
...

How can I do that in SAS ?

unbik
  • 178
  • 9

1 Answers1

0

The basechar() function will get you there most of the way, but you may have a few leftover. You can take care of those manually with tranwrd().

data want;
    set have;

    col1 = basechar(col1);
    col1 = tranwrd(col1, 'Ł', 'L');
run; 

You can find all of the letters that are remaining with compress:

remaining = compress(col1, 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ');
Stu Sztukowski
  • 10,597
  • 1
  • 12
  • 21