[eluser]Unknown[/eluser]
Hello,
I encounter a strange bug with accentuated data submitted in a form.
Here is my controller :
Code:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Test extends CI_Controller {
function __construct() {
parent::__construct();
$this->output->enable_profiler(TRUE);
}
function index() {
$this->load->view('test');
}
}
And here is my view test.php :
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html >
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title></title>
</head>
<body>
<?php var_dump($_POST); ?>
<form action="" method="post" accept-charset="utf-8">
<textarea name="message"></textarea>
<button type="submit">Envoyer</button>
</form>
</body>
</html>
When I submit a message containing
no accentuated characters, everything goes fine :
Quote:array(1) { ["message"]=> string(6) "azerty" }
But as soon as I submit
a accentuated character, the POST data is empty...
Quote:array(1) { ["message"]=> string(0) "" }
Do you know what's happening ?