src/Sulu/Component/Import/Format/Xliff12.php
private function utf8ToCharset($content, $encoding = null)
    {
        if ('UTF-8' !== $encoding && !empty($encoding)) {
            if (function_exists('mb_convert_encoding')) {
                return mb_convert_encoding($content, $encoding, 'UTF-8');
            }

            if (function_exists('iconv')) {
                return iconv('UTF-8', $encoding, $content);
            }

            throw new \RuntimeException('No suitable convert encoding function (use UTF-8 as your encoding or install the iconv or mbstring extension).');
        }

        return $content;
    }
private function utf8ToCharset($content, $encoding = null)
    {
        if ('UTF-8' !== $encoding && !empty($encoding)) {
            if (function_exists('mb_convert_encoding')) {
                return mb_convert_encoding($content, $encoding, 'UTF-8');
            }

            if (function_exists('iconv')) {
                return iconv('UTF-8', $encoding, $content);
            }

            throw new \RuntimeException('No suitable convert encoding function (use UTF-8 as your encoding or install the iconv or mbstring extension).');
        }

        return $content;
    }
private function utf8ToCharset ( $ content , $ encoding = null ) { if ( 'UTF-8' !== $ encoding && ! empty ( $ encoding ) ) { if ( function_exists ( 'mb_convert_encoding' ) ) { return mb_convert_encoding ( $ content , $ encoding , 'UTF-8' ) ; } if ( function_exists ( 'iconv' ) ) { return iconv ( 'UTF-8' , $ encoding , $ content ) ; } throw new \ RuntimeException ( 'No suitable convert encoding function (use UTF-8 as your encoding or install the iconv or mbstring extension).' ) ; } return $ content ; }
Part of Symfony XliffFileLoader.

@param string $content String to decode
@param string $encoding Target encoding

@return string
Part of Symfony XliffFileLoader .