Welcome Guest, Not a member yet? Register   Sign In
Store Euro-sign from POST value?

Hi guys,

I'm running into an annoying problem with a website I'm running. Somehow when people use a Euro-sign in a comment form, it ends up as 'â?¬'. Off course the problem lies in encoding issues.

I myself don't have this particular problem when posting comments. So the question is how to make this encoding thing fool proof?

So far I have added this:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

My Codigniter config has:

$config['charset'] = "UTF-8";

And MySQL is configured as:

MySQL charset: UTF-8 Unicode (utf8)
MySQL connection collation: utf8_unicode_ci

Does anyone have experience with this issue?



[eluser]Jamie Rumbelow[/eluser]
Try setting the "accept-charset" attribute in your form to "utf-8". That should work:

<form action="whatever" method="POST" accept-charset="utf-8">


Thanks Jamie,

I've added this to the form, so let's see if this works. Problem is still that my browser switches to UTF-8 without problems, so difficult to test this myself Smile


Theme © iAndrew 2016 - Forum software by © MyBB