<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/refs.international.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'it',
  ),
  'this' => 
  array (
    0 => 'book.mbstring.php',
    1 => 'Multibyte String',
    2 => 'Multibyte String',
  ),
  'up' => 
  array (
    0 => 'refs.international.php',
    1 => 'Supporto al linguaggio umano e condifica caratteri',
  ),
  'prev' => 
  array (
    0 => 'function.intl-is-failure.php',
    1 => 'intl_is_failure',
  ),
  'next' => 
  array (
    0 => 'mbstring.setup.php',
    1 => 'Installazione/Configurazione',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/mbstring/book.xml',
  ),
  'history' => 
  array (
  ),
  'extra_header_links' => 
  array (
    'rel' => 'alternate',
    'href' => '/manual/en/feeds/book.mbstring.atom',
    'type' => 'application/atom+xml',
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="book.mbstring" class="book">
 
 <h1 class="title">Multibyte String</h1> 
 
 
 <div id="intro.mbstring" class="preface">
  <h1 class="title">Introduzione</h1>
  <p class="para">
   While there are many languages in which every necessary character can
   be represented by a one-to-one mapping to an 8-bit value, there are also
   several languages which require so many characters for written
   communication that they cannot be contained within the range a mere byte 
   can code (A byte is made up of eight bits. Each bit can contain only two 
   distinct values, one or zero. Because of this, a byte can only represent 
   256 unique values (two to the power of eight)). Multibyte character 
   encoding schemes were developed to express more than 256 characters 
   in the regular bytewise coding system.
  </p>
  <p class="para">
   When you manipulate (trim, split, splice, etc.) strings encoded in a
   multibyte encoding, you need to use special functions since two or more
   consecutive bytes may represent a single character in such encoding
   schemes. Otherwise, if you apply a non-multibyte-aware string function
   to the string, it probably fails to detect the beginning or ending of
   the multibyte character and ends up with a corrupted garbage string that
   most likely loses its original meaning.
  </p>
  <p class="para">
   <code class="literal">mbstring</code> provides multibyte specific string functions 
   that help you deal with multibyte encodings in PHP. In addition to that, 
   <code class="literal">mbstring</code> handles character encoding conversion between 
   the possible encoding pairs. <code class="literal">mbstring</code> is designed to 
   handle Unicode-based encodings such as UTF-8 and UCS-2 and many 
   single-byte encodings for convenience (listed in <a href="mbstring.supported-encodings.php" class="link">Supported Character Encodings</a>).
  </p>
 </div>
 
 
 







 




 

 



 






 







 





 







 







 


 





<ul class="chunklist chunklist_book"><li><a href="mbstring.setup.php">Installazione/Configurazione</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="mbstring.installation.php">Installazione</a></li><li><a href="mbstring.configuration.php">Configurazione di Runtime</a></li></ul></li><li><a href="mbstring.constants.php">Costanti predefinite</a></li><li><a href="mbstring.encodings.php">Summaries of supported encodings</a></li><li><a href="mbstring.ja-basic.php">Basics of Japanese multi-byte encodings</a></li><li><a href="mbstring.http.php">HTTP Input and Output</a></li><li><a href="mbstring.supported-encodings.php">Supported Character Encodings</a></li><li><a href="mbstring.overload.php">Function Overloading Feature</a></li><li><a href="mbstring.php4.req.php">PHP Character Encoding Requirements</a></li><li><a href="ref.mbstring.php">Multibyte String Funzioni</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="function.mb-check-encoding.php">mb_check_encoding</a> — Check if strings are valid for the specified encoding</li><li><a href="function.mb-chr.php">mb_chr</a> — Return character by Unicode code point value</li><li><a href="function.mb-convert-case.php">mb_convert_case</a> — Perform case folding on a string</li><li><a href="function.mb-convert-encoding.php">mb_convert_encoding</a> — Convert a string from one character encoding to another</li><li><a href="function.mb-convert-kana.php">mb_convert_kana</a> — Convert &quot;kana&quot; one from another (&quot;zen-kaku&quot;, &quot;han-kaku&quot; and more)</li><li><a href="function.mb-convert-variables.php">mb_convert_variables</a> — Convert character code in variable(s)</li><li><a href="function.mb-decode-mimeheader.php">mb_decode_mimeheader</a> — Decode string in MIME header field</li><li><a href="function.mb-decode-numericentity.php">mb_decode_numericentity</a> — Decode HTML numeric string reference to character</li><li><a href="function.mb-detect-encoding.php">mb_detect_encoding</a> — Detect character encoding</li><li><a href="function.mb-detect-order.php">mb_detect_order</a> — Set/Get character encoding detection order</li><li><a href="function.mb-encode-mimeheader.php">mb_encode_mimeheader</a> — Encode string for MIME header</li><li><a href="function.mb-encode-numericentity.php">mb_encode_numericentity</a> — Encode character to HTML numeric string reference</li><li><a href="function.mb-encoding-aliases.php">mb_encoding_aliases</a> — Get aliases of a known encoding type</li><li><a href="function.mb-ereg.php">mb_ereg</a> — Regular expression match with multibyte support</li><li><a href="function.mb-ereg-match.php">mb_ereg_match</a> — Regular expression match for multibyte string</li><li><a href="function.mb-ereg-replace.php">mb_ereg_replace</a> — Replace regular expression with multibyte support</li><li><a href="function.mb-ereg-replace-callback.php">mb_ereg_replace_callback</a> — Perform a regular expression search and replace with multibyte support using a callback</li><li><a href="function.mb-ereg-search.php">mb_ereg_search</a> — Multibyte regular expression match for predefined multibyte string</li><li><a href="function.mb-ereg-search-getpos.php">mb_ereg_search_getpos</a> — Returns start point for next regular expression match</li><li><a href="function.mb-ereg-search-getregs.php">mb_ereg_search_getregs</a> — Retrieve the result from the last multibyte regular expression match</li><li><a href="function.mb-ereg-search-init.php">mb_ereg_search_init</a> — Setup string and regular expression for a multibyte regular expression match</li><li><a href="function.mb-ereg-search-pos.php">mb_ereg_search_pos</a> — Returns position and length of a matched part of the multibyte regular expression for a predefined multibyte string</li><li><a href="function.mb-ereg-search-regs.php">mb_ereg_search_regs</a> — Returns the matched part of a multibyte regular expression</li><li><a href="function.mb-ereg-search-setpos.php">mb_ereg_search_setpos</a> — Set start point of next regular expression match</li><li><a href="function.mb-eregi.php">mb_eregi</a> — Regular expression match ignoring case with multibyte support</li><li><a href="function.mb-eregi-replace.php">mb_eregi_replace</a> — Replace regular expression with multibyte support ignoring case</li><li><a href="function.mb-get-info.php">mb_get_info</a> — Get internal settings of mbstring</li><li><a href="function.mb-http-input.php">mb_http_input</a> — Detect HTTP input character encoding</li><li><a href="function.mb-http-output.php">mb_http_output</a> — Set/Get HTTP output character encoding</li><li><a href="function.mb-internal-encoding.php">mb_internal_encoding</a> — Set/Get internal character encoding</li><li><a href="function.mb-language.php">mb_language</a> — Set/Get current language</li><li><a href="function.mb-lcfirst.php">mb_lcfirst</a> — Make a string's first character lowercase</li><li><a href="function.mb-list-encodings.php">mb_list_encodings</a> — Returns an array of all supported encodings</li><li><a href="function.mb-ltrim.php">mb_ltrim</a> — Strip whitespace (or other characters) from the beginning of a string</li><li><a href="function.mb-ord.php">mb_ord</a> — Get Unicode code point of character</li><li><a href="function.mb-output-handler.php">mb_output_handler</a> — Callback function converts character encoding in output buffer</li><li><a href="function.mb-parse-str.php">mb_parse_str</a> — Parse GET/POST/COOKIE data and set global variable</li><li><a href="function.mb-preferred-mime-name.php">mb_preferred_mime_name</a> — Get MIME charset string</li><li><a href="function.mb-regex-encoding.php">mb_regex_encoding</a> — Set/Get character encoding for multibyte regex</li><li><a href="function.mb-regex-set-options.php">mb_regex_set_options</a> — Set/Get the default options for mbregex functions</li><li><a href="function.mb-rtrim.php">mb_rtrim</a> — Strip whitespace (or other characters) from the end of a string</li><li><a href="function.mb-scrub.php">mb_scrub</a> — Replace ill-formed byte sequences with the substitute character</li><li><a href="function.mb-send-mail.php">mb_send_mail</a> — Send encoded mail</li><li><a href="function.mb-split.php">mb_split</a> — Split multibyte string using regular expression</li><li><a href="function.mb-str-pad.php">mb_str_pad</a> — Pad a multibyte string to a certain length with another multibyte string</li><li><a href="function.mb-str-split.php">mb_str_split</a> — Given a multibyte string, return an array of its characters</li><li><a href="function.mb-strcut.php">mb_strcut</a> — Get part of string</li><li><a href="function.mb-strimwidth.php">mb_strimwidth</a> — Get truncated string with specified width</li><li><a href="function.mb-stripos.php">mb_stripos</a> — Finds position of first occurrence of a string within another, case insensitive</li><li><a href="function.mb-stristr.php">mb_stristr</a> — Finds first occurrence of a string within another, case insensitive</li><li><a href="function.mb-strlen.php">mb_strlen</a> — Get string length</li><li><a href="function.mb-strpos.php">mb_strpos</a> — Find position of first occurrence of string in a string</li><li><a href="function.mb-strrchr.php">mb_strrchr</a> — Finds the last occurrence of a character in a string within another</li><li><a href="function.mb-strrichr.php">mb_strrichr</a> — Finds the last occurrence of a character in a string within another, case insensitive</li><li><a href="function.mb-strripos.php">mb_strripos</a> — Finds position of last occurrence of a string within another, case insensitive</li><li><a href="function.mb-strrpos.php">mb_strrpos</a> — Find position of last occurrence of a string in a string</li><li><a href="function.mb-strstr.php">mb_strstr</a> — Finds first occurrence of a string within another</li><li><a href="function.mb-strtolower.php">mb_strtolower</a> — Make a string lowercase</li><li><a href="function.mb-strtoupper.php">mb_strtoupper</a> — Trasforma una stringa in lettere maiuscole</li><li><a href="function.mb-strwidth.php">mb_strwidth</a> — Return width of string</li><li><a href="function.mb-substitute-character.php">mb_substitute_character</a> — Set/Get substitution character</li><li><a href="function.mb-substr.php">mb_substr</a> — Get part of string</li><li><a href="function.mb-substr-count.php">mb_substr_count</a> — Count the number of substring occurrences</li><li><a href="function.mb-trim.php">mb_trim</a> — Strip whitespace (or other characters) from the beginning and end of a string</li><li><a href="function.mb-ucfirst.php">mb_ucfirst</a> — Make a string's first character uppercase</li></ul></li></ul></div><?php manual_footer($setup); ?>