$_POST empty if there is accent in text |
Hi everyone I'm trying to create a bee that accepts a json in post and I realized that if the word "CoupÈ" in the json text is present, the variable $_POST is empty. I'm using codeigniter but I do not think that's the reason. In the codeigniter configuration I see that $config['charset'] = 'UTF-8' is set;
The json I'm trying to receive is this: Code: { Any suggestion is useful. thank you so much Giuseppe
Check this https://www.codeigniter.com/user_guide/l...input.html
The solution should be $something = $this->input->post('CoupE'); Also make sure your form method is "POST"
There are those who tell lies with meaning behind them and those meaning less lies!
Here is the error that I get from your sample Json and its not on CoupÈ
Error: Parse error on line 4: ...": 0, "modello": “popoloso” }, { ----------------------^ Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[', got 'undefined'
There are those who tell lies with meaning behind them and those meaning less lies!
If you are using Javascript try using JSON.stringify(object) and in PHP its json_encode(array) to generate valid JSON.
God Bless CI Contributors
|
Welcome Guest, Not a member yet? Register Sign In |