Call to Yii::t makes response body start with UTF BOM

I use pChart to generate images in a controller action.

This works fine until I call Yii::t somewhere in the action. Doing that causes the response body to start with { 0xEF, 0xBB, 0xBF, 0x89 } instead of "PNG".

From what I’ve gathered so far, the hex code is the UTF BOM. Considering that my response is an image, it’s not exactly needed.

Any idea on how I can change that behaviour?

Ok that one is solved. The include file with the translated messages was encoded in UTF-8 BOM. Changing it to UTF-8 solved the problem.