While developing a multilingual application for a client using PHPActiveRecord, I noticed that foreign characters were not getting read properly from the database due to an incorrect charset.
The problem is two fold. First, the database connection used needs to be set to have a UTF8 charset. Second, the documentation for UTF8 charset support for PHPActiveRecord is wrong.
From PHPActiveRecord documentation:
The correct version / the fix:
Notice that the end has a ? before charset and NOT a semi-colon. This is because this path is parsed using PHP parse_url which doesn't recognize the content following the semi-colon as a query.