Symfony\Component\Templating\PhpEngine::convertEncoding
Convert a string from one encoding to another.
Signature
public function convertEncoding(string
$string,
string
$to,
string
$from )
Parameters
$string
— string- The string to convert
$to
— string- The input encoding
$from
— string- The output encoding
Returns
- string
- The string with the new encoding
Errors/Exceptions
-
RuntimeException
- if no suitable encoding function is found (iconv or mbstring)