Change record status: 
Project: 
Introduced in branch: 
8.x
Description: 

As of Drupal 8, most of unicode.inc functionality has been transferred to a Unicode component.
While most procedural wrappers have not be removed, they should be considered deprecated, if you want your code to be unit-testable.

Drupal 7 Drupal 8

Functions

unicode_check() Unicode::check()

Constants

PREG_CLASS_UNICODE_WORD_BOUNDARY Unicode::PREG_CLASS_WORD_BOUNDARY
UNICODE_SINGLEBYTE Unicode::STATUS_SINGLEBYTE
UNICODE_MULTIBYTE Unicode::STATUS_MULTIBYTE
UNICODE_ERROR Unicode::STATUS_ERROR

Global variables

global $multibyte Unicode::getStatus() | Unicode::setStatus($status)

Functionalities

drupal_convert_to_utf8() Unicode::convertToUtf8()
drupal_truncate_bytes() Unicode::truncateBytes()
truncate_utf8() Unicode::truncate()
mime_header_encode() Unicode::mimeHeaderEncode()
mime_header_decode() Unicode::mimeHeaderDecode()
drupal_strlen() Unicode::strlen()
drupal_strtoupper() Unicode::strtoupper()
drupal_strtolower() Unicode::strtolower()
drupal_ucfirst() Unicode::ucfirst()
drupal_substr() Unicode::substr()
drupal_validate_utf8() Unicode::validateUtf8()
decode_entities() String::decodeEntities()
Impacts: 
Module developers
Updates Done (doc team, etc.)
Online documentation: 
Not done
Theming guide: 
Not done
Module developer documentation: 
Not done
Examples project: 
Not done
Coder Review: 
Not done
Coder Upgrade: 
Not done
Other: 
Other updates done

Comments

amarphule’s picture

D7 D8 Deprecated Use
... Unicode::setStatus mb_setStatus()
drupal_strlen() Unicode::strlen mb_strlen()
... Unicode::strpos mb_strpos()
drupal_strtolower() Unicode::strtolower mb_strtolower()
drupal_strtoupper() Unicode::strtoupper mb_strtoupper()
drupal_substr() Unicode::substr mb_substr()

For more information visit following link
https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Component%21Util...

plach’s picture

See also https://www.drupal.org/node/2457593 for a few later renames.