CodeIgniter Forums
utf8 special characters problem by forms - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: utf8 special characters problem by forms (/showthread.php?tid=62565)



utf8 special characters problem by forms - Kabouter - 07-30-2015

When you put special characters in my form they change into � when the page reloads. It also destroys my input because the characters are not placed in the database. This happens only with opera(probably chrome also) and firefox. Internet explorer works fine. Rolleyes


Does somebody know how to fix this.


RE: utf8 special characters problem by forms - ivantcholakov - 07-30-2015

Offtopic: I don't see closing body and html tags at the bottom of the page with the form.


RE: utf8 special characters problem by forms - ivantcholakov - 07-30-2015

There should not be white-space (new-lines, spaces) characters before <!DOCTYPE HTML>.


RE: utf8 special characters problem by forms - ivantcholakov - 07-30-2015

And here is the problem in the source:

<meta charset="utf-8"> - at the top - Ok

<form action="http://www.rommelmarkten.org/toevoegen" method="post" accept-charset="iso-8859-1"> - this is how the form opens, why accept-charset="iso-8859-1"?


RE: utf8 special characters problem by forms - Kabouter - 07-30-2015

Thank you very much! I putted the accept-charset= in the button instead of the form. It is working. I will fix the other issue also.


RE: utf8 special characters problem by forms - raknjak - 03-29-2017

"accept-charset" will not work on your button, it will not do anything but invalidate your page. Check this:
- <meta charset="utf-8">
- browser needs to be set to utf-8 (should be for all modern browsers) Google even removed this option and auto-detects.
- $config['charset'] = 'UTF-8';
- database utf8_unicode_ci