I am working currently on a Laravel (Laravel version: 5.1.46 (LTS), PHP version: PHP 7.0.13) application that uses Firebird for database. I use iconv() to convert UTF-8 strings into Windows-1250 to save a record. Since about 2 days it stopped working.
iconv('UTF-8', 'WINDOWS-1250', 'ékezet');
This is the code I use to convert it and than pass it to the following SQL query:
\DB::select(\DB::raw("UPDATE CIKK_LEIRASOK SET LEIRAS = '$leiras' WHERE VONALKOD = " . $product->VONALKOD));
But something went wrong and I get the following error:
SQLSTATE[HY000]: General error: -104 Dynamic SQL Error SQL error code = -104 Malformed string (SQL: UPDATE CIKK_LEIRASOK SET LEIRAS = ' ?kezet ' WHERE VONALKOD = 1)
I googled about it but couldn't find anything and I have no clue what could be wrong.
Anyone more experienced in this subject?