Subject Re: [firebird-php] Re: Help needed with PHP/FB on Firebird website
Author Milan Babuskov
u.masotti wrote:
>> You can run this test script to see whether your version is affected:
> My PHP 5.0 Centos4 Web Server is affected indeed; my luck is I don't use in my Web apps DECIMAL or NUMERIC.
> In my Ubuntu 10.4 PHP 5.2.6-2ubuntu4.1 there is one more test failing: check CHAR padding for SELECT and SP.
> By default I trim() all char fields in result set, so I never noted this, but I must go deeper in what that means.

If you use a multi-byte character set (ex. UTF-8), Firebird returs it
padded to (size*bytes_per_char). For example, a CHAR(10) column is
always padded to 40 characters. Whether PHP's driver should "cut" the
result to correct padding is debatable.

I'm using UTF-8 in my applications since november last year, so I wrote
a thin wrapper around ibase_* to trim everything, just like you did.


Milan Babuskov