We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Character not in repertoire

Hello!

I've just pulled my project to a server with Freebsd, Postgresql 9.3 and Phalcon 2.0.1

When I try to work with a Model object with fields values of non-latin symbols I get the next message:

Character not in repertoire: 7 ERROR: invalid byte sequence for encoding "UTF8"

For example, just one string from trace when i get this error:

/www/msres/dev/app/controllers/ProblemsController.php(83): Tags::findFirstByName('\xF0\xB1\xF0\xBB\xF0\xB0\xF0\xB3\xF0\xBE\xF1\x83\xF1\x81\xF1...')

How should I avoid that? Thank you!



1.3k
Accepted
answer
edited Apr '16

The solution was in adding the next row into the begin of index.php file

mb_internal_encoding('UTF-8');