From 5c9096af247b5998345c4d37ebab3053895e5bdc Mon Sep 17 00:00:00 2001 From: Alex Pott Date: Sun, 9 Nov 2014 15:32:01 -0800 Subject: [PATCH] Issue #2361727 by rpayanm: Remove drupal_convert_to_utf8. --- core/includes/unicode.inc | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/core/includes/unicode.inc b/core/includes/unicode.inc index 78c095b0d02..a1de69f0b46 100644 --- a/core/includes/unicode.inc +++ b/core/includes/unicode.inc @@ -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. *