Skip to main content
Solved

How to find charaters and replace it?

  • March 22, 2021
  • 3 replies
  • 46 views

hoa_le
Contributor
Forum|alt.badge.img+5

I want to replace attributes from Unicode to without accent.

For example : Find âÂăĂđĐêÊôÔơƠưƯ --> Replace aAaAdDeEoOoOuU

Ăn >> An

Đô >> Do

 

Could you tell me how to replace it by python or other way?

Thank you

Best answer by caracadrian

Use StringPairReplacer with Replacement Pairs set to  â a Â A ă a Ă A đ d Đ D ê e Ê E ô o Ô O ơ o Ơ o ư u Ư U.

The pair are separated by space as following 

key value key value

where key is the string you want to replace and  value is the replacement string.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

caracadrian
Contributor
Forum|alt.badge.img+23
  • Contributor
  • Best Answer
  • March 22, 2021

Use StringPairReplacer with Replacement Pairs set to  â a Â A ă a Ă A đ d Đ D ê e Ê E ô o Ô O ơ o Ơ o ư u Ư U.

The pair are separated by space as following 

key value key value

where key is the string you want to replace and  value is the replacement string.


hoa_le
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • March 22, 2021

Use StringPairReplacer with Replacement Pairs set to  â a Â A ă a Ă A đ d Đ D ê e Ê E ô o Ô O ơ o Ơ o ư u Ư U.

The pair are separated by space as following 

key value key value

where key is the string you want to replace and  value is the replacement string.

Thank you so much @caracadrian​ 


david_r
Celebrity
  • March 22, 2021

There's a custom transformer on the FME Hub that does it for you:

https://hub.safe.com/publishers/jeroenstiers/transformers/stringcleaner

It's fully generic and does not need any settings.