CVS update: php3/doc/functions

From: Date: Wed, 28 Oct 1998 05:27:49 +0000
Subject: CVS update: php3/doc/functions
Groups: php.dev 
Request: Send a blank email to php-dev+get-2059@lists.php.net to get a copy of this message
Date: Wednesday October 28, 1998 @ 0:27 Author: ssb Update of /repository/php3/doc/functions In directory asf:/u2/tmp/cvs-serv15755/doc/functions Modified Files: xml.sgml Log Message: added utf8_encode() and utf8_decode() Index: php3/doc/functions/xml.sgml diff -c php3/doc/functions/xml.sgml:1.14 php3/doc/functions/xml.sgml:1.15 *** php3/doc/functions/xml.sgml:1.14 Tue Oct 27 22:35:52 1998 --- php3/doc/functions/xml.sgml Wed Oct 28 00:27:49 1998 *************** *** 1349,1354 **** --- 1349,1440 ---- </refsect1> </refentry> + <refentry id="function.utf8-decode"> + <refnamediv> + <refname>utf8_decode</refname> + <refpurpose>converts an UTF-8 encoded string to ISO-8859-1</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcdef>string <function>utf8_encode</function></funcdef> + <paramdef>string <parameter>data</parameter></paramdef> + </funcsynopsis> + <para> + This function decodes <parameter>data</parameter>, assumed to be + <literal>UTF-8</literal> encoded, to <literal>ISO-8859-1</literal>. + </para> + <para> + See <function>utf8_encode</function> for an explaination of UTF-8 + encoding. + </para> + </refsect1> + </refentry> + + <refentry id="function.utf8-encode"> + <refnamediv> + <refname>utf8_encode</refname> + <refpurpose>encodes an ISO-8859-1 string to UTF-8</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcdef>string <function>utf8_encode</function></funcdef> + <paramdef>string <parameter>data</parameter></paramdef> + </funcsynopsis> + <para> + This function encodes the string <parameter>data</parameter> to + <literal>UTF-8</literal>, and returns the encoded version. + <literal>UTF-8</literal> is a standard mechanism used by + <acronym>Unicode</acronym>for encoding <glossterm>wide + character</glossterm> values into a byte stream. + <literal>UTF-8</literal> is transparent to plain + <abbrev>ASCII</abbrev> characters, is self-synchronized (meaning + it is possible for a program to figure out where in the + bytestream characters start) and can be used with normal string + comparison functions for sorting and such. PHP encodes + <literal>UTF-8</literal> characters in up to four bytes, like + this: + <table> + <title>UTF-8 encoding</title> + <tgroup cols="3"> + <thead> + <row> + <entry>bytes</entry> + <entry>bits</entry> + <entry>representation</entry> + </row> + </thead> + <tbody> + <row> + <entry>1</entry> + <entry>7</entry> + <entry>0bbbbbbb</entry> + </row> + <row> + <entry>2</entry> + <entry>11</entry> + <entry>110bbbbb 10bbbbbb</entry> + </row> + <row> + <entry>3</entry> + <entry>16</entry> + <entry>1110bbbb 10bbbbbb 10bbbbbb</entry> + </row> + <row> + <entry>4</entry> + <entry>21</entry> + <entry>11110bbb 10bbbbbb 10bbbbbb 10bbbbbb</entry> + </row> + </tbody> + </tgroup> + </table> + Each <replaceable>b</replaceable> represents a bit that can be + used to store character data. + </para> + </refsect1> + </refentry> + </reference> <!-- Keep this comment at the end of the file Local variables: -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#2059) next »