mbstring.php4.req.html

来自「php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容」· HTML 代码 · 共 105 行

HTML
105
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head>  <title>PHP Character Encoding Requirements</title>  <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="mbstring.overload.html">Function Overloading Feature</a></div> <div class="next" style="text-align: right; float: right;"><a href="ref.mbstring.html">Multibyte String Functions</a></div> <div class="up"><a href="book.mbstring.html">Multibyte String</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div> <h1>PHP Character Encoding Requirements</h1> <p class="para">  Encodings of the following types are safely used with PHP.  <ul class="itemizedlist">   <li class="listitem">    <p class="para">     A singlebyte encoding,     <ul class="itemizedlist">      <li class="listitem">       <span class="simpara">        which has ASCII-compatible (ISO646 compatible) mappings for the        characters in range of <i>00h</i> to        <i>7fh</i>.       </span>      </li>     </ul>    </p>   </li>   <li class="listitem">    <p class="para">     A multibyte encoding,     <ul class="itemizedlist">      <li class="listitem">       <span class="simpara">        which has ASCII-compatible mappings for the characters in range of        <i>00h</i> to <i>7fh</i>.       </span>      </li>      <li class="listitem">       <span class="simpara">        which don&#039;t use ISO2022 escape sequences.       </span>      </li>      <li class="listitem">       <span class="simpara">        which don&#039;t use a value from <i>00h</i> to        <i>7fh</i> in any of the compounded bytes        that represents a single character.       </span>      </li>     </ul>      </p>   </li>  </ul> </p> <p class="para">  These are examples of character encodings that are unlikely to work  with PHP.  <div class="informalexample">   <div class="example-contents"><div class="cdata"><pre>JIS, SJIS, ISO-2022-JP, BIG-5</pre></div>   </div>  </div> </p> <p class="para">  Although PHP scripts written in any of those encodings might not work,  especially in the case where encoded strings appear as identifiers  or literals in the script, you can almost avoid using these encodings  by setting up the <i>mbstring</i>&#039;s transparent encoding  filter function for incoming HTTP queries. </p> <blockquote><p><b class="note">Note</b>:      It&#039;s highly discouraged to use SJIS, BIG5, CP936, CP949 and GB18030 for   the internal encoding unless you are familiar with the parser, the   scanner and the character encoding.  <br /> </p></blockquote> <blockquote><p><b class="note">Note</b>:      If you are connecting to a database with PHP, it is recommended that   you use the same character encoding for both the database and the   <i>internal encoding</i> for ease of use and better   performance.  <br />     If you are using PostgreSQL, the character encoding used in the   database and the one used in PHP may differ as it supports   automatic character set conversion between the backend and the frontend.  <br /> </p></blockquote></div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="mbstring.overload.html">Function Overloading Feature</a></div> <div class="next" style="text-align: right; float: right;"><a href="ref.mbstring.html">Multibyte String Functions</a></div> <div class="up"><a href="book.mbstring.html">Multibyte String</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?