Solved

How to find charaters and replace it?

  • 22 March 2021
  • 3 replies
  • 8 views

Badge +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

icon

Best answer by caracadrian 22 March 2021, 06:30

View original

3 replies

Badge +20

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.

Badge +5

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​ 

Userlevel 4

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.

 

Reply