iconv
symfony/var-dumper
Supported Versions: PHP 4 >= 4.0.5, PHP 5, PHP 7, PHP 8
Convert a string from one character encoding to another
iconv
(
string $from_encoding
,
string $to_encoding
,
string $string
):
string
|
false
throw new
\RuntimeException
(
'Unable to convert a non-UTF-8 string to UTF-8: required function iconv() does not exist. You should install ext-iconv or symfony/polyfill-iconv.'
);
}
if (
false
!==
$c
= @
iconv
(
$this
->
charset
,
'UTF-8'
,
$s
)) {
return
$c
;
}
if (
'CP1252'
!==
$this
->
charset
&&
false
!==
$c
= @
iconv
(
'CP1252'
,
'UTF-8'
,
$s
)) {
Dumper/AbstractDumper.php
if (
false
!==
$c
= @
iconv
(
$this
->
charset
,
'UTF-8'
,
$s
)) {
return
$c
;
}
if (
'CP1252'
!==
$this
->
charset
&&
false
!==
$c
= @
iconv
(
'CP1252'
,
'UTF-8'
,
$s
)) {
return
$c
;
}
Dumper/AbstractDumper.php
return
$c
;
}
return
iconv
(
'CP850'
,
'UTF-8'
,
$s
);
}
}
Dumper/AbstractDumper.php