Subject Re: [Firebird-general] Need to trim extra spaces at the end of field value - PHP / Firebird
Author Milan Babuskov
Carlos H. Cantu wrote:
> CHAR will return the string with as much trailing spaces needed to fit
> the result size to the declared CHAR size of the field.
> select '|' || cast('12345 ' as varchar(10)) || '|' from rdb$database
> will return |12345 |

P.S. If you use UTF-8 charset, PHP driver has a bug, so it pads strings
to size*4 spaces. In your example, it would have 35 spaces for padding.

Milan Babuskov