cvs: phpdoc /en/reference/iconv/functions iconv.xml

From: Date: Fri, 17 Apr 2009 07:36:59 +0000
Subject: cvs: phpdoc /en/reference/iconv/functions iconv.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-3768@lists.php.net to get a copy of this message
rquadling Fri Apr 17 07:36:59 2009 UTC Modified files: /phpdoc/en/reference/iconv/functions iconv.xml Log: Updated example to show //TRANSLIT, //IGNORE and added E_NOTICE details. http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/iconv/functions/iconv.xml?r1=1.13&r2=1.14&diff_format=u Index: phpdoc/en/reference/iconv/functions/iconv.xml diff -u phpdoc/en/reference/iconv/functions/iconv.xml:1.13 phpdoc/en/reference/iconv/functions/iconv.xml:1.14 --- phpdoc/en/reference/iconv/functions/iconv.xml:1.13 Wed Jun 20 22:24:37 2007 +++ phpdoc/en/reference/iconv/functions/iconv.xml Fri Apr 17 07:36:59 2009 @@ -1,5 +1,5 @@ -<?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.13 $ --> +<?xml version="1.0" encoding="UTF-8"?> +<!-- $Revision: 1.14 $ --> <refentry xml:id="function.iconv" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>iconv</refname> @@ -47,7 +47,7 @@ characters. If you append the string <literal>//IGNORE</literal>, characters that cannot be represented in the target charset are silently discarded. Otherwise, <parameter>str</parameter> is cut from the first - illegal character. + illegal character and an <constant>E_NOTICE</constant> is generated. </para> </listitem> </varlistentry> @@ -78,10 +78,27 @@ <programlisting role="php"> <![CDATA[ <?php -echo iconv("ISO-8859-1", "UTF-8", "This is a test."); +$text = "This is the Euro symbol '€'."; + +echo 'Original : ', $text, PHP_EOL; +echo 'TRANSLIT : ', iconv("UTF-8", "ISO-8859-1//TRANSLIT", $text), PHP_EOL; +echo 'IGNORE : ', iconv("UTF-8", "ISO-8859-1//IGNORE", $text), PHP_EOL; +echo 'Plain : ', iconv("UTF-8", "ISO-8859-1", $text), PHP_EOL; + ?> ]]> </programlisting> + &example.outputs.similar; + <screen> +<![CDATA[ +Original : This is the Euro symbol '€'. +TRANSLIT : This is the Euro symbol 'EUR'. +IGNORE : This is the Euro symbol ''. +Plain : +Notice: iconv(): Detected an illegal character in input string in .\iconv-example.php on line 7 +This is the Euro symbol ' +]]> + </screen> </example> </para> </refsect1>

« previous php.doc.cvs (#3768) next »