BookmarkSubscribeRSS Feed
USP2405
Obsidian | Level 7

I am using translate function to replace these all vowels into their case equivalent. Since these vowels are with special values translate function is not working for me. Can anyone please help on it?

e.g. 

translate from - 'à' , 'À' , 'è' , 'È' , ''î' , 'Î' , 'ô' , 'Ô'

Translate to - a, A, e, E, i, I, o, O

1 REPLY 1
BrunoMueller
SAS Super FREQ

You could use the BASECHAR function to do this, like so:

 

data want;
  text = 'abc*àÀèÈîÎôÔ*def' ;
  baseText = basechar(text);
run;

SAS Viya is always running with UTF-8 encoding, some function are byte based and will not work with UTF-8 encoding.

 

You can also use the KTRANSLATE function, just replace TRANSLATE with KTRANSLATE

SAS Innovate 2025: Register Today!

 

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

Discussion stats
  • 1 reply
  • 660 views
  • 1 like
  • 2 in conversation