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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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