how to remove diacritical marks from characters?????

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 17
Accepted Solution

how to remove diacritical marks from characters?????

Does anybody have any ideas how to remove diacritical marks from character??

Please, help!


Accepted Solutions
Solution
‎04-10-2013 11:03 AM
Respected Advisor
Posts: 4,934

Re: how to remove diacritical marks from characters?????

Use the translate function.

cleanStr = translate(diacStr,"aceg","āčēģ");

PG

PG

View solution in original post


All Replies
SAS Employee
Posts: 224

Re: how to remove diacritical marks from characters?????

Hi Denis,

Can you provide a little more information about what you are trying to remove the characters from?

Thanks!

Occasional Contributor
Posts: 17

Re: how to remove diacritical marks from characters?????

Posted in reply to reneeharper

Hi.

Let's say, I have a row with characters: "āabcčdeēfgģ" and i'm looking for a possibility to covert it to the "aabccdeefgg".

I mean to covert these characters to "clean" Latin characters without any diacritical marks.

Denis

Solution
‎04-10-2013 11:03 AM
Respected Advisor
Posts: 4,934

Re: how to remove diacritical marks from characters?????

Use the translate function.

cleanStr = translate(diacStr,"aceg","āčēģ");

PG

PG
Occasional Contributor
Posts: 17

Re: how to remove diacritical marks from characters?????

translate function looks pretty good, but we are limited with knowledge of an appropriate letters of one language in this case, for example:

cleanStr=translate(text,"euioasgklzcn","ēūīõāšģķļžčņ");


for German, Finnish (and so on) there will be another letters.

might be it is possible to remove diacritical marks itself?

Respected Advisor
Posts: 2,655

Re: how to remove diacritical marks from characters?????

Think about how the characters are coded--most likely UTF.  As such, each has a hexadecimal representation.  The translate function matches up one in the first string with one in the second, and returns the first.  I think what you are looking for is something that "physically" removes the diacritical marks, and I doubt it exists.

Steve Denham

Occasional Contributor
Posts: 17

Re: how to remove diacritical marks from characters?????

Posted in reply to SteveDenham

ok, I see.

Thank you, Steve!

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 6 replies
  • 2551 views
  • 3 likes
  • 4 in conversation