harrygulliford / laravel-firebird

Firebird database driver for the Laravel Framework
65 stars 30 forks source link

Char Vs Varchar - a strange "b" character #31

Closed kobaiashi closed 2 years ago

kobaiashi commented 2 years ago

Schermata del 2022-07-08 14-45-17 "harrygulliford/laravel-firebird": "^3.1" Laravel v9.16.0 (PHP v8.1.2) Firebird 2.5.4 charset ISO8859_1

if I read a field (CPDES in screenshot) of type Char(50) (ISO8859_1) containing an accented character -> I find a "b" character antecedent to the string if the field is a Varchar(200) (LECOM in screenshot) -> no problem

maybe missing a utf8_encode ?

harrygulliford commented 2 years ago

See here: https://stackoverflow.com/a/42224939

The b prefix on a string in Symfony VarDumper means that it is not valid UTF-8. You could either try a different charset on the driver or use something like https://github.com/neitanod/forceutf8