mb_convert_encoding
symfony/var-dumper
Supported Versions: PHP 4 >= 4.0.6, PHP 5, PHP 7, PHP 8
Convert a string from one character encoding to another
mb_convert_encoding
(array|
string $string
,
string $to_encoding
, array|
string
|
null $from_encoding
=
null
): array|
string
|
false
}
$this
->
lastDepth
=
$depth
;
$this
->
line
=
mb_convert_encoding
(
$this
->
line
,
'HTML-ENTITIES'
,
'UTF-8'
);
if (-
1
===
$depth
) {
AbstractDumper
::
dumpLine
(
0
);
Dumper/HtmlDumper.php
public function
testCharset
()
{
$var
=
mb_convert_encoding
(
'Словарь'
,
'CP1251'
,
'UTF-8'
);
$dumper
= new
HtmlDumper
(
'php://output'
,
'CP1251'
);
$dumper
->
setDumpHeader
(
'<foo></foo>'
);
Tests/Dumper/HtmlDumperTest.php