Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

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!



427
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');