I'm having a weird (for me) behavior in a simple webapp built in codeigniter + doctrine.
I have a local apache server and I shared hosting with the same code and both apps connect to the same database (hosted in the shared hosting)
This database has UTF-8 Unicode charset and utf8_general_ci collation.
All forms and pages have the meta charset like this.
<!DOCTYPE html>
<html lang="es" xml:lang="es">
<head>
<meta charset="utf-8">
The thing is, in one server (let's say local) I put something like "institució", I save it and I can see it fine, but, on the other server (the remote one) I see something like "instituci�"
Then I go to the shared hosting, I fix the word to "institució" and then I see on the local server this word is displayed as "institució"
I can't use "utf8_decode" or "utf8_encode" because depending where I save this string I have to decode or encode.
I'm sure I'm missing some configuration but I don't know where to start with.
Locally I've got installed the default apache2 server of Mavericks.
I retrieve post data and save it into the doctrine object like this:
$question->setQuestion($this->input->post('question'));
I thought codeigniter and doctrine take care of this.
Thanks!