Convert characters to Ascii Is there a twig filter to encode special characters like umlauts:
{{ entry.title | filter }}


  Datensätze &amp; Karten


Which then should result in:


  datensaetze-karten


Basically what 'convertFilenamesToAscii' =&gt; true, does but as a filter.

I want to use this as a anchorlink later on so umlauts are not the best to have in anchor links.
I would use a combination of things:


Twig's replace filter to convert ä to ae etc.
Twig's convert_encoding filter to eliminate any remaining non-ascii characters
Craft's kebab filter to do its thing


and of course wrap the thing up in a macro

{% macro ascii_kebab(s) %}
  {{ s
    | replace({
        'ä': 'ae'
      })
    | convert_encoding('ASCII', 'UTF-8')
    | kebab
  }}
{% endmacro %}