Doc #51858 [NEW]: mb_convert_case example is not the best

From: Date: Wed, 19 May 2010 08:52:17 +0000
Subject: Doc #51858 [NEW]: mb_convert_case example is not the best
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-4403@lists.php.net to get a copy of this message
From: Operating system: PHP version: Irrelevant Package: Documentation problem Bug Type: Documentation Problem Bug description:mb_convert_case example is not the best 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 bug report at http://bugs.php.net/bug.php?id=51858&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=51858&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=51858&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=51858&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=51858&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=51858&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=51858&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=51858&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=51858&r=needscript Try newer version: http://bugs.php.net/fix.php?id=51858&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=51858&r=support Expected behavior: http://bugs.php.net/fix.php?id=51858&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=51858&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=51858&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=51858&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=51858&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=51858&r=dst IIS Stability: http://bugs.php.net/fix.php?id=51858&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=51858&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=51858&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=51858&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=51858&r=mysqlcfg

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