5 The ``convert_encoding`` filter was added in Twig 1.4.
7 The ``convert_encoding`` filter converts a string from one encoding to
8 another. The first argument is the expected output charset and the second one
13 {{ data|convert_encoding('UTF-8', 'iso-2022-jp') }}
17 This filter relies on the `iconv`_ or `mbstring`_ extension, so one of
18 them must be installed. In case both are installed, `mbstring`_ is used by
19 default (Twig before 1.8.1 uses `iconv`_ by default).
24 * ``from``: The input charset
25 * ``to``: The output charset
27 .. _`iconv`: http://php.net/iconv
28 .. _`mbstring`: http://php.net/mbstring