convert_encoding

The convert_encoding filter converts a string from one encoding to another. The first argument is the expected output charset and the second one is the input charset:

convert_encoding フィルターは、文字列をあるエンコーディングから別のエンコーディングに変換します。最初の引数は予想される出力文字セットで、2 番目の引数は入力文字セットです。
1
{{ data|convert_encoding('UTF-8', 'iso-2022-jp') }}

Note

ノート

This filter relies on the iconv extension.

このフィルターは、iconv 拡張機能に依存しています。

Arguments

  • to: The output charset
    to: 出力文字セット
  • from: The input charset
    from: 入力文字セット