[GIS] the best FME Transformer for Text search and replace in attribute fields

fmetext;transformer

I have a number of feature classes which have fields containing text which has somehow become improperly encoded. The fields contain german text which should be either ä, ö, ü, ß but instead contains for instance Kindergärten instead of Kindergärten …etc

What transformer best allows me to check the field for "ä" and replaces it with ä?

Best Answer

that's probably not done with one transformer. I'd use a StringSearcher or SubstringExtractor to get the characters that make Problems. You can then try if a StringReplacer can replace the characters. If again a the german characters are not replaced correctly you could analyse the ASCII code with the CharacterCodeExtractor and replace it with CharacterCodeReplacer. See doc of CharacterCodeExtractor:

CharacterCodeExtractor

Extracts the integral character code of the first character in the source string attribute, and adds its integer value in the character set to the feature as another attribute.

This can be used to obtain the ASCII code of any character, including non-printable ones.

Related Question