note 115285 added to function.iconv

From: Date: Fri, 27 Jun 2014 11:52:15 +0000
Subject: note 115285 added to function.iconv
Groups: php.notes 
Request: Send a blank email to php-notes+get-199776@lists.php.net to get a copy of this message
Note an important difference between iconv() and mb_convert_encoding() - if you're working with strings, as opposed to files, you most likely want mb_convert_encoding() and not iconv(), because iconv() will add a byte-order marker to the beginning of (for example) a UTF-32 string when converting from e.g. ISO-8859-1, which can throw off all your subsequent calculations and operations on the resulting string. In other words, iconv() appears to be intended for use when converting the contents of files - whereas mb_convert_encoding() is intended for use when juggling strings internally, e.g. strings that aren't being read/written to/from files, but exchanged with some other media. ---- Server IP: 195.184.96.15 Probable Submitter: 83.221.143.226 ---- Manual Page -- http://php.net/manual/en/function.iconv.php Edit -- https://master.php.net/note/edit/115285 Del: integrated -- https://master.php.net/note/delete/115285/integrated Del: useless -- https://master.php.net/note/delete/115285/useless Del: bad code -- https://master.php.net/note/delete/115285/bad+code Del: spam -- https://master.php.net/note/delete/115285/spam Del: non-english -- https://master.php.net/note/delete/115285/non-english Del: in docs -- https://master.php.net/note/delete/115285/in+docs Del: other reasons-- https://master.php.net/note/delete/115285 Reject -- https://master.php.net/note/reject/115285 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#199776) next »