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: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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