Doc #51858 [Asn->Csd]: mb_convert_case example is not the best

From: Date: Wed, 19 May 2010 09:44:43 +0000
Subject: Doc #51858 [Asn->Csd]: mb_convert_case example is not the best
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-4406@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=51858&edit=1 ID: 51858 Updated by: aharvey@php.net Reported by: dani88elx at gmail dot com Summary: mb_convert_case example is not the best -Status: Assigned +Status: Closed Type: Documentation Problem Package: Documentation problem PHP Version: Irrelevant Assigned To: aharvey New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Previous Comments: ------------------------------------------------------------------------ [2010-05-19 11:44:29] aharvey@php.net Automatic comment from SVN on behalf of aharvey Revision: http://svn.php.net/viewvc/?view=revision&revision=299482 Log: Fix doc bug #51858 (mb_convert_case example is not the best) by adding some examples to the manual pages for mb_convert_case, mb_strtoupper and mb_strtolower that use multi-byte characters (specifically Greek). ------------------------------------------------------------------------ [2010-05-19 10:58:02] dani88elx at gmail dot com sh**! last line should be echo mb_convert_case($str, MB_CASE_TITLE, "UTF-8"); // prints: Mary Had A Little Lamb And She Loved It So ------------------------------------------------------------------------ [2010-05-19 10:52:16] dani88elx at gmail dot com Description: ------------ Example on mb_convert_case() does not show the utility of the function, since the sample text has no accents or special characters. It will be useful a comparison with strtoupper() / strtolower() I proppose the following better examples: $str= "Thís is à tëxt with çpécýal châráctèrs"; echo strtoupper($str); //prints a corrupted text in UTF: THÃ�S IS Ã� TÃ�XT WITH Ã�PÃ�CÃ�AL CHÃ�RÃ�CTÃ�RS echo mb_convert_case($str, MB_CASE_UPPER, "UTF-8"); // prints a valid upper case conversion in UTF: THÍS IS À TËXT WITH ÇPÉCÝAL CHÂRÁCTÈRS $str = "mary had a Little lamb and she loved it so"; echo = mb_convert_case($str, MB_CASE_TITLE, "UTF-8"); // prints: Mary Had A Little Lamb And She Loved It So ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=51858&edit=1

« previous php.doc.bugs (#4406) next »