note 103805 added to function.mb-convert-encoding

From: Date: Wed, 04 May 2011 15:00:04 +0000
Subject: note 103805 added to function.mb-convert-encoding
Groups: php.notes 
Request: Send a blank email to php-notes+get-179409@lists.php.net to get a copy of this message
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! ---- Server IP: 69.147.83.197 Probable Submitter: 71.206.239.239 ---- Manual Page -- http://www.php.net/manual/en/function.mb-convert-encoding.php Edit -- https://master.php.net/note/edit/103805 Del: integrated -- https://master.php.net/note/delete/103805/integrated Del: useless -- https://master.php.net/note/delete/103805/useless Del: bad code -- https://master.php.net/note/delete/103805/bad+code Del: spam -- https://master.php.net/note/delete/103805/spam Del: non-english -- https://master.php.net/note/delete/103805/non-english Del: in docs -- https://master.php.net/note/delete/103805/in+docs Del: other reasons-- https://master.php.net/note/delete/103805 Reject -- https://master.php.net/note/reject/103805 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#179409) next »