unicode.inc

  • Provides Unicode-related conversions and operations.

File

includes/unicode.inc

Functions

Name Description
decode_entities Decodes all HTML entities (including numerical ones) to regular UTF-8 bytes.
drupal_convert_to_utf8 Converts data to UTF-8.
drupal_strlen Counts the number of characters in a UTF-8 string.
drupal_strtolower Lowercase a UTF-8 string.
drupal_strtoupper Uppercase a UTF-8 string.
drupal_substr Cuts off a piece of a string based on character indices and counts.
drupal_truncate_bytes Truncates a UTF-8-encoded string safely to a number of bytes.
drupal_ucfirst Capitalizes the first letter of a UTF-8 string.
drupal_xml_parser_create Prepares a new XML parser.
mime_header_decode Decodes MIME/HTTP encoded header values.
mime_header_encode Encodes MIME/HTTP header values that contain incorrectly encoded characters.
truncate_utf8 Truncates a UTF-8-encoded string safely to a number of characters.
unicode_check Wrapper around _unicode_check().
unicode_requirements Returns Unicode library status and errors.
_mime_header_decode Decodes encoded header data passed from mime_header_decode().
_unicode_caseflip Flips U+C0-U+DE to U+E0-U+FD and back.
_unicode_check Perform checks about Unicode support in PHP, and set the right settings if needed.

Constants

Name Description
PREG_CLASS_UNICODE_WORD_BOUNDARY Matches Unicode characters that are word boundaries.
UNICODE_ERROR Indicates an error during check for PHP unicode support.
UNICODE_MULTIBYTE Indicates that full unicode support with the PHP mbstring extension is being used.
UNICODE_SINGLEBYTE Indicates that standard PHP (emulated) unicode support is being used.

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!unicode.inc/7.x