Issue #2361727 by rpayanm: Remove drupal_convert_to_utf8.

8.0.x
Alex Pott 2014-11-09 15:32:01 -08:00
parent 45c6581cf2
commit 5c9096af24
1 changed files with 0 additions and 23 deletions

View File

@ -112,29 +112,6 @@ function drupal_xml_parser_create(&$data) {
return $xml_parser;
}
/**
* Converts data to UTF-8.
*
* @param string $data
* The data to be converted.
* @param string $encoding
* The encoding that the data is in.
*
* @return string|bool
* Converted data or FALSE.
*
* @deprecated in Drupal 8.x-dev, will be removed before Drupal 8.0.0.
* Use \Drupal\Component\Utility\Unicode::convertToUtf8().
*/
function drupal_convert_to_utf8($data, $encoding) {
$out = Unicode::convertToUtf8($data, $encoding);
if ($out === FALSE) {
\Drupal::logger('php')->error('Unsupported encoding %s. Please install iconv, GNU recode or mbstring for PHP.', array('%s' => $encoding));
}
return $out;
}
/**
* Truncates a UTF-8-encoded string safely to a number of bytes.
*