Building Chinese Web Sites using PHP
Dr. Herong Yang, Version 2.11

List of Multibyte String Functions

This section provides a quick list of multibyte string functions related to Chinese characters.

By reviewing the PHP manual, I consider the following multibyte string functions are important for manipulating Chinese character strings:

  • mb_check_encoding - Check if the string is valid for the specified encoding
  • mb_convert_encoding - Convert character encoding
  • mb_convert_variables - Convert character code in variable(s)
  • mb_decode_mimeheader - Decode string in MIME header field
  • mb_decode_numericentity - Decode HTML numeric string reference to character
  • mb_detect_encoding - Detect character encoding
  • mb_detect_order - Set/Get character encoding detection order
  • mb_encode_mimeheader - Encode string for MIME header
  • mb_encode_numericentity - Encode character to HTML numeric string reference
  • mb_get_info - Get internal settings of mbstring
  • mb_http_input - Detect HTTP input character encoding
  • mb_http_output - Set/Get HTTP output character encoding
  • mb_internal_encoding - Set/Get internal character encoding
  • mb_language - Set/Get current language
  • mb_list_encodings_alias_names - Returns an array of all supported alias encodings
  • mb_list_encodings - Returns an array of all supported encodings
  • mb_list_mime_names - Returns an array or string of all supported mime names
  • mb_output_handler - Callback function converts character encoding in output buffer
  • mb_parse_str - Parse GET/POST/COOKIE data and set global variable
  • mb_preferred_mime_name - Get MIME charset string
  • mb_send_mail - Send encoded mail
  • mb_strcut - Get part of string
  • mb_strimwidth - Get truncated string with specified width
  • mb_stripos - Finds position of first occurrence of a string within another, case insensitive
  • mb_stristr - Finds first occurrence of a string within another, case insensitive
  • mb_strlen - Get string length
  • mb_strpos - Find position of first occurrence of string in a string
  • mb_strrchr - Finds the last occurrence of a character in a string within another
  • mb_strrichr - Finds the last occurrence of a character in a string within another, case insensitive
  • mb_strripos - Finds position of last occurrence of a string within another, case insensitive
  • mb_strrpos - Find position of last occurrence of a string in a string
  • mb_strstr - Finds first occurrence of a string within another
  • mb_substitute_character - Set/Get substitution character
  • mb_substr_count - Count the number of substring occurrences
  • mb_substr - Get part of string

Sections in This Chapter

php_mbstring.dll - Multibyte String Functions

mb_strlen() - Counting Multibyte Characters

List of Multibyte String Functions

Dr. Herong Yang, updated in 2007
List of Multibyte String Functions