Documentation

convertEncoding

string|array|\SplFixedArray|boolean public static
\Bitrix\Main\Text\Encoding::convertEncoding(
 string|array|\SplFixedArray $data,
 string $charsetFrom,
 string $charsetTo,
 string $errorMessage = ""
);

Static method converts data from source encoding into target encoding. Returns converted data or false otherwise.

Parameters

ParameterDescriptionVersion
$dataData for conversion. Data can be an array from version 16.0.10.
$charsetFromSource encoding
$charsetToTarget encoding
$errorMessageLink to the variable, containing error messages.

Example



© «Bitrix24», 2001-2024
Up