How to remove special accents of some language from table in SAS Enterprise Guide?

562 Views Asked by At

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 ?

1

There are 1 best solutions below

1
Stu Sztukowski On BEST ANSWER

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');