added iconv function and modified for corrupted character in japanese manual.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@50394 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Rui Hirokawa 2001-07-01 03:38:18 +00:00
parent 524113c7e9
commit 299588cbb0
2 changed files with 202 additions and 0 deletions

View file

@ -2835,6 +2835,20 @@ $ php4-enable
</listitem>
</varlistentry>
<varlistentry id="install.configure.with-iconv">
<term>
<parameter>--with-iconv[=DIR]</parameter>
</term>
<listitem>
<para>
PHP 3: Option not available in PHP 3
</para>
<para>
PHP 4: Include iconv support.
</para>
</listitem>
</varlistentry>
<varlistentry id="install.configure.with-pspell">
<term>
<parameter>--with-pspell[=DIR]</parameter>

188
functions/iconv.xml Normal file
View file

@ -0,0 +1,188 @@
<reference id="ref.iconv">
<title>iconv functions</title>
<titleabbrev>iconv</titleabbrev>
<partintro>
<para>
This module contains an interface to the iconv library functions. To
be able to use the functions defined in this
module you must compile you PHP interpreter using the --with-iconv
option. In order to do so, you must have iconv() function in
standard C library or libiconv installed on your system.
libiconv library is available from <ulink url="&url.libiconv;">
&url.libiconv;</ulink>.
</para>
<para>
iconv library function converts files between various encoded
character sets. The supported character sets depend on iconv()
implementation on your system. Note that iconv() function in some
system is not work well as you expect. In this case, you should
install libiconv library.
</para>
</partintro>
<refentry id="function.iconv">
<refnamediv>
<refname>iconv</refname>
<refpurpose>Convert string to requested character encoding</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcprototype>
<funcdef>string <function>iconv</function></funcdef>
<paramdef>string <parameter>in_charset</parameter></paramdef>
<paramdef>string <parameter>out_charset</parameter></paramdef>
<paramdef>string <parameter>str</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
It converts the string <parameter>string</parameter> encoded in
<parameter>in_charset</parameter> to the string encoded in
<parameter>out_charset</parameter>. It returns the converted
string or FALSE, if it fails.
</para>
<para>
<example>
<title><function>iconv</function> example:</title>
<programlisting role="php">
echo iconv("ISO-8859-1","UTF8","This is test.");
</programlisting>
</example>
</para>
</refsect1>
</refentry>
<refentry id="function.iconv-get-encoding">
<refnamediv>
<refname>iconv_get_encoding</refname>
<refpurpose>
Get current setting for character encoding conversion
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcprototype>
<funcdef>array <function>iconv_get_encoding</function></funcdef>
<paramdef>string
<parameter><optional>type</optional></parameter>
</paramdef>
</funcprototype>
</funcsynopsis>
<para>
It returns the current settings of
<function>ob_iconv_handler</function> as array or FALSE in failure.
</para>
<para>
See also:
<function>iconv_set_encoding</function>,
<function>ob_iconv_handler</function>.
</para>
</refsect1>
</refentry>
<refentry id="function.iconv-set-encoding">
<refnamediv>
<refname>iconv_set_encoding</refname>
<refpurpose>
Set current setting for character encoding conversion
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcprototype>
<funcdef>array <function>iconv_set_encoding</function></funcdef>
<paramdef>string <parameter>type</parameter></paramdef>
<paramdef>string <parameter>charset</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
It changes the value of <parameter>type</parameter> to
<parameter>charset</parameter> and returns TRUE in success or
FALSE in failure.
</para>
<para>
<example>
<title><function>iconv_set_encoding</function> example:</title>
<programlisting role="php">
iconv_set_encoding("internal_encoding", "UTF-8");
iconv_set_encoding("output_encoding", "ISO-8859-1");
</programlisting>
</example>
</para>
<para>
See also:
<function>iconv_get_encoding</function>,
<function>ob_iconv_handler</function>.
</para>
</refsect1>
</refentry>
<refentry id="function.ob-iconv-handler">
<refnamediv>
<refname>ob_iconv_handler</refname>
<refpurpose>
Convert character encoding as output buffer handler
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcprototype>
<funcdef>array <function>ob_iconv_handler</function></funcdef>
<paramdef>string
<parameter>contents</parameter>
</paramdef>
<paramdef>int
<parameter>status</parameter>
</paramdef>
</funcprototype>
</funcsynopsis>
<para>
It converts the string encoded in
<parameter>internal_encoding</parameter> to
<parameter>output_encoding</parameter>.
</para>
<para>
<parameter>internal_encoding</parameter> and
<parameter>output_encoding</parameter> should be defined
by <function>iconv_set_encoding</function> or in
configuration file.
</para>
<para>
<example>
<title><function>ob_iconv_handler</function> example:</title>
<programlisting role="php">
ob_start("ob_iconv_handler"); // start output buffering
</programlisting>
</example>
</para>
<para>
See also:
<function>iconv_get_encoding</function>,
<function>iconv_set_encoding</function>.
</para>
</refsect1>
</refentry>
</reference>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:"../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->