You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The result using ibase_fetch_object will be 'A ' ("A" padded with 3 spaces).
select cast('A' as varchar(1)) from rdb$database;
The result will be 'A', which is correct.
It seems that FB transfers the char(1) padded with spaces to fill the 4 bytes buffer, but for the end user, a char(1) should never return more than 1 character. IMHO, in such cases, the PHP driver should strip out any extra spaces before delivering the result to the final user in a way that the result would never has more characters than the declared field size.
The text was updated successfully, but these errors were encountered:
With a FB connection using charset UTF-8:
select cast('A' as char(1)) from rdb$database;
The result using ibase_fetch_object will be 'A ' ("A" padded with 3 spaces).
select cast('A' as varchar(1)) from rdb$database;
The result will be 'A', which is correct.
It seems that FB transfers the char(1) padded with spaces to fill the 4 bytes buffer, but for the end user, a char(1) should never return more than 1 character. IMHO, in such cases, the PHP driver should strip out any extra spaces before delivering the result to the final user in a way that the result would never has more characters than the declared field size.
The text was updated successfully, but these errors were encountered: