Skip to content

ConvertUmlaut Operator

Martin Danielsson edited this page Jul 23, 2015 · 2 revisions

Converts umlauts to plain characters (strings). Using operator configurations, this can be used to replace any character with any other string.

What Type
Syntax ConvertUmlaut(a)
a any
Return type string

Example: ConvertUmlaut($lastName), will e.g. turn Müller into Mueller.

The following character replacements are configured "out of the box":

Character Replacement
ä ae
ö oe
ü ue
ß ss
é e
è e
í i
ì i
å a

Operator Configuration

Using an operator configuration, this list may be extended to arbitrary character replacements. In order to make sure the characters are correctly processed from the configuration file, store the XML configuration file in UTF-8 encoding.

<OperatorConfigs>
  <OperatorConfig name="ConvertUmlaut">c1=repl1, c2=repl2,...</OperatorConfig>
</OperatorConfigs>

If you provide an operator config, the default replacements are also replaced. If you want to add additional replacements, extend the following snippet:

<OperatorConfigs>
  <OperatorConfig name="ConvertUmlaut">ä=ae, ö=oe, ü=ue, ß=ss, é=e, è=e, í=i, ì=i, å=a</OperatorConfig>
</OperatorConfigs>

Note: Only single characters can be used for searching, whereas the replacement string may be multiple characters.

XML Escaping

The ConvertUmlaut operator may be (mis-)used for XML escaping:

<OperatorConfigs>
  <OperatorConfig name="ConvertUmlaut">&lt;=&amp;lt;, &gt;=&amp;gt;, &amp;=&amp;amp;</OperatorConfig>
</OperatorConfigs>

This looks strange. But will work.

Clone this wiki locally