title: What is the usefulness of mb_http_output() given that the output encoding is typically fixed by other means?
body: <p>All over the Internet, including in stackoverflow, it is suggested to use mb_http_input('utf-8') to have PHP works in the UTF-8 encoding. For example, see <a href="https://stackoverflow.com/questions/12984841/php-mysql-encoding-problems-a-instead-of-certain-characters">PHP/MySQL encoding problems. &#226;�� instead of certain characters</a>. On the other hand, the PHP manual says that we cannot fix the input encoding within the PHP script and that mb_http_input is only a way to query what it is, not a way to set it. See <a href="http://www.php.net/manual/en/mbstring.http.php" rel="nofollow noreferrer">http://www.php.net/manual/en/mbstring.http.php</a> and <a href="http://php.net/manual/en/function.mb-httpetinput.php" rel="nofollow noreferrer">http://php.net/manual/en/function.mb-httpetinput.php</a> . Ok, this was just a clarification of the context before the question. It seems to me that there is a lot of redundant commands in Apache + PHP + HTML to control the conversion from the input encoding to the  internal encoding and finally to the output encoding. I don't understand the usefulness of this.  For example, if the original input encoding from some external HTTP client is EUC-JP and I set the internal encoding to UTF-8, then PHP would have to make the conversion. Am I right? If I am right, why would I set an input encoding in php.ini (instead of just passing the original one) given that it would be next immediately converted to the utf-8 internal encoding anyway?  A similar question hold for the output. In all my htpp files, I use a meta tag with charset=utf-8. So, the output HTTP encoding is fixed. Moreover, in PHP.ini, I can set the default_charset that will appear in the HTTP header to utf-8. Why would I bother to use mb_http_output('uft-8') when the final output encoding is already fixed. To sum up, can someone give me a practical concrete example where mb_http_output('uft-8') is clearly necessary and cannot be replaced by more usual commands that are often inserted by default in editors such as Dreamweaver?       </p>