I am developing an app using Codeigniter. In this app I got a form with user data.
All works fine if the user submits a form with only A-Z characters but if he is using
special characters like ä,é,î,ø,ù the value of that field is not submitted to the controller!
This problem drives me crazy. I cannot figure out why the field is ignored? The same
field works fine with A-Z characters as said.
Update
In config I got: $config[‘charset’] = ‘UTF-8’;
I am making a POST request.
This is my View code:
<?php echo form_open('accounts/save', 'name="theform"'); ?>
<p><?php echo form_input('firstname', null); ?></p>
<p><?php echo form_input('lastname', null); ?>
<div id="button_green">
<a href="javascript: submitform()">Save the data</a>
</div> <!-- End of button_green -->
<?php echo form_close(); ?>
Update 2
After a looong chat with the excellent @motto and @slavic it came down to a bug
with PHP 5.3.6 (which I am using).
More information about the bug here: https://github.com/EllisLab/CodeIgniter/issues/261
This is the line causing the problem:
$str = @iconv(‘UTF-8’, ‘UTF-8//IGNORE’, $str);
Line: 89
File: core/utf8.php
According to this bug report:
https://github.com/EllisLab/CodeIgniter/issues/261
You should use CI with different version of php. (Especially not 5.3.6)