jacquestvanzuydam / laravel-firebird

Firebird Illuminate package for Laravel 5
63 stars 93 forks source link

Issue with UTF8 charset #16

Closed zamarrong closed 5 years ago

zamarrong commented 8 years ago

Always whem im trying to get UTF8 characters like ñ, á, ó, é, ° etc i have this error, help me please i need fix this to have mi app in production.

UnexpectedValueException in Response.php line 403: The Response content must be a string or object implementing __toString(), "boolean" given.

jacquestvanzuydam commented 8 years ago

Have you explicitly set the UTF8 charset in your .etc file? A snippet of your code would also be helpful.

Hesto commented 8 years ago

Hello, I have the same problem. My database has charset =WIN1250 . I set it in .env file and still i can't get characters like ą,ł,ę,ó,ć etc. Do you have any solution?

zamarrong commented 8 years ago

Hello, i solved it putting this function on my models:

public function setRawAttributes(array $attributes, $sync = false) { foreach ($attributes as $index => $attribute) { $attributes[$index] = utf8_decode($attribute); } return parent::setRawAttributes($attributes, $sync); }