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: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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