<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE >GNU Recode Functions</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK REL="HOME" TITLE="PHP 手册" HREF="index.html"><LINK REL="UP" TITLE="函数参考" HREF="funcref.html"><LINK REL="PREVIOUS" TITLE="readline" HREF="function.readline.html"><LINK REL="NEXT" TITLE="recode_file" HREF="function.recode-file.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=UTF-8"></HEAD ><BODY CLASS="reference" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >PHP 手册</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="function.readline.html" ACCESSKEY="P" >上一页</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="function.recode-file.html" ACCESSKEY="N" >下一页</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="reference" ><A NAME="ref.recode" ></A ><DIV CLASS="TITLEPAGE" ><H1 CLASS="title" >CXXXVII. GNU Recode Functions</H1 ><DIV CLASS="PARTINTRO" ><A NAME="AEN197203" ></A ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="recode.intro" >简介</A ></H1 ><P > This module contains an interface to the GNU Recode library. The GNU Recode library converts files between various coded character sets and surface encodings. When this cannot be achieved exactly, it may get rid of the offending characters or fall back on approximations. The library recognises or produces nearly 150 different character sets and is able to convert files between almost any pair. Most <A HREF="http://www.faqs.org/rfcs/rfc1345" TARGET="_top" >RFC 1345</A > character sets are supported. </P ><DIV CLASS="note" ><BLOCKQUOTE CLASS="note" ><P ><B >注意: </B >本扩展模块在 Windows 平台下不可用。</P ></BLOCKQUOTE ></DIV ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="recode.requirements" >需求</A ></H1 ><P > You must have GNU Recode 3.5 or higher installed on your system. You can download the package from <A HREF="http://directory.fsf.org/All_GNU_Packages/recode.html" TARGET="_top" >http://directory.fsf.org/All_GNU_Packages/recode.html</A >. </P ><DIV CLASS="warning" ><P ></P ><TABLE CLASS="warning" BORDER="1" WIDTH="100%" ><TR ><TD ALIGN="CENTER" ><B >警告</B ></TD ></TR ><TR ><TD ALIGN="LEFT" ><P > The Recode library version 3.6 adds weird characters behind converted strings under certain circumstances. Thus it's safer to use Recode v3.5 or one of the available alternatives like the <A HREF="ref.iconv.html" >iconv</A > or <A HREF="ref.mbstring.html" >mbstring</A > extension. </P ></TD ></TR ></TABLE ></DIV ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="recode.installation" >安装</A ></H1 ><P > To be able to use the functions defined in this module you must compile your PHP interpreter using the <CODE CLASS="option" >--with-recode[=DIR]</CODE > option. </P ><DIV CLASS="warning" ><P ></P ><TABLE CLASS="warning" BORDER="1" WIDTH="100%" ><TR ><TD ALIGN="CENTER" ><B >警告</B ></TD ></TR ><TR ><TD ALIGN="LEFT" ><P > Crashes and startup problems of PHP may be encountered when loading the recode as extension <SPAN CLASS="strong" ><B CLASS="emphasis" >after</B ></SPAN > loading any extension of <A HREF="ref.mysql.html" >mysql</A > or <A HREF="ref.imap.html" >imap</A >. Loading the recode before those extension has proved to fix the problem. This is due a technical problem that both the c-client library used by imap and recode have their own <TT CLASS="literal" >hash_lookup()</TT > function and both mysql and recode have their own <TT CLASS="literal" >hash_insert</TT > function. </P ></TD ></TR ></TABLE ></DIV ><DIV CLASS="warning" ><P ></P ><TABLE CLASS="warning" BORDER="1" WIDTH="100%" ><TR ><TD ALIGN="CENTER" ><B >警告</B ></TD ></TR ><TR ><TD ALIGN="LEFT" ><P ><A HREF="ref.imap.html" >IMAP</A >,<A HREF="ref.recode.html" >recode</A >,<A HREF="ref.yaz.html" >YAZ</A > 和 <A HREF="ref.cyrus.html" >Cyrus</A > 扩展模块不能同时使用,因为它们共享了相同的内部符号。</P ></TD ></TR ></TABLE ></DIV ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="recode.configuration" >运行时配置</A ></H1 ><P >本扩展模块在 <TT CLASS="filename" >php.ini</TT > 中未定义任何配置选项。</P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="recode.resources" >资源类型</A ></H1 ><P >本扩展模块未定义任何资源类型。</P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="recode.constants" >预定义常量</A ></H1 ><P >本扩展模块未定义任何常量。</P ></DIV ></DIV ><DIV CLASS="TOC" ><DL ><DT ><B >目录</B ></DT ><DT ><A HREF="function.recode-file.html" >recode_file</A > -- Recode from file to file according to recode request</DT ><DT ><A HREF="function.recode-string.html" >recode_string</A > -- Recode a string according to a recode request</DT ><DT ><A HREF="function.recode.html" >recode</A > -- 别名 <A HREF="function.recode-string.html" ><B CLASS="function" >recode_string()</B ></A ></DT ></DL ></DIV ></DIV ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="function.readline.html" ACCESSKEY="P" >上一页</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >起始页</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="function.recode-file.html" ACCESSKEY="N" >下一页</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >readline</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="funcref.html" ACCESSKEY="U" >上一级</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >recode_file</TD ></TR ></TABLE ></DIV ></BODY ></HTML >