note 103805 rejected from function.mb-convert-encoding by danbrown
| From: | danbrown@php.net | Date: | Wed, 04 May 2011 15:02:08 +0000 |
| Subject: | note 103805 rejected from function.mb-convert-encoding by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-179410@lists.php.net to get a copy of this message | ||
Note Submitter: danspammail at aol dot com
----
I was just wondering if mb_convert_encoding() calls mb_detect_encoding if the "from
encoding" field is left blank? It seems a bit improper, although trivial, to write:
$encoding = mb_detect_encoding($my_str, "auto");
$converted_str = mb_convert_encoding($my_str, "UTF-8", $encoding);
When it seems that this would do the same thing:
$converted_str = mb_convert_encoding($my_str, "UTF-8");
Am I correct in thinking these are equivalent?
Thanks!