2

all are well?

So, is the following:

CakePHP 1.3.11
MySQL 5.1
Apache 2.2
PHP 5.3

Charset / Collate the database created for the application:

utf8
utf8_general_ci

app / config / database.php

'encoding' => 'utf8'

charset of all files:

utf8

The problem? When I try to save, for example:

"Currículo"

I got in return

"Currículo"

Where is the problem?

Note: locally on my notebook, the application works correctly, even saving incorrectly, that is, even saving "Currículo" CakePHP when the bank takes the data, they are presented correctly, BUT when passing it to the client server, appeared in the same way in the database.

It really is very strange.

1 Answer 1

2

maybeeeee.. ( i'll assume that Currículo comes from an HTML FORM )

check that you're using the correct charset on the head tag:

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

if you're using Firefox, go to View->Encoding to check that utf-8 is selected. (the meta should tell firefox what charset should be used)

If that's not the problem, try doing a simple query test, something like:

$this->MyModel->query("INSERT INTO .... ('Currículo')");

if it doesn't work, then you'll know that the problem is between php and mysql.

Hope this helps.

Sign up to request clarification or add additional context in comments.

1 Comment

Yes, I forget the charset form and another 'things', including close mysql connection and reconnect after change params in CakePHP. Now, works.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.