iconv's input_encoding useless?

From: Date: Tue, 05 Oct 2004 16:23:28 +0000
Subject: iconv's input_encoding useless?
Groups: php.internals 
Request: Send a blank email to internals+get-13173@lists.php.net to get a copy of this message
Hi, perhaps I'm just missing something, the docs don't really mention anything about that issue... Shouldn't iconv decode HTTP input from "input_encoding" to "internal_encoding", and if not, then what is the input_encoding setting for? Here's a small script to reproduce: ====================================================== <?php iconv_set_encoding('internal_encoding', 'iso-8859-1'); iconv_set_encoding('input_encoding', 'utf-8'); iconv_set_encoding('output_encoding', 'utf-8'); ob_start('ob_iconv_handler'); ?> <form method="post" action="?"> <input name="data" type="text"> <input type="submit"> </form> <hr> <pre> <?php print_r($_POST); foreach ($_POST as $k => $v) $_POST[$k] = iconv('utf-8', 'iso-8859-1', $v); print_r($_POST); ?> </pre> ====================================================== Many thanks, -- Michael - < mike(@)php.net >

Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
« previous php.internals (#13173) next »