On 13/12/2014 09:14, Mark Rotteveel m...@lawinegevaar.nl [firebird-support] wrote:

On 12-12-2014 15:38, Tim Ward t...@telensa.com [firebird-support] wrote:
> On 12/12/2014 14:15, Mark Rotteveel m...@lawinegevaar.nl
> [firebird-support] wrote:
>>
>> What is the default character set of your database (if I had to guess it
>> is UTF8), and what is your connection character set (if I had to guess
>> it's
>> NONE or not specified)?
>>
> Database charset is UTF8. Connection charset appears also to be UTF8.

If the connection character set is UTF8 (this needs to be specified
explicitly!) then it looks like the driver is misbehaving.


The call is

ibase_connect(TSL_DATABASE, TSL_FB_USERNAME, TSL_FB_PASSWORD, TSL_FB_CHARSET, TSL_FB_BUFFERS, TSL_FB_DIALECT);

where

define('TSL_FB_CHARSET', 'UTF8');   //NB: no dash, not 'UTF-8'



The 'problem' is that a CHAR(1) in UTF8 is sent as 4 bytes. If the
character in question is a one-byte UTF8 character, then the remaining
three bytes are 0x20 (a space). A driver should truncate the string to
the declared number of characters, but doesn't do that here.

A potential workaround might be to use VARCHAR(1) instead.

Mark
--
Mark Rotteveel




--
Tim Ward

  • ... emad...@yahoo.com.au [firebird-support]
    • ... Svein Erling Tysvær svein.erling.tysv...@kreftregisteret.no [firebird-support]
      • ... Tim Ward t...@telensa.com [firebird-support]
        • ... Nick Upson n...@telensa.com [firebird-support]
        • ... Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
          • ... Tim Ward t...@telensa.com [firebird-support]
            • ... Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
              • ... Tim Ward t...@telensa.com [firebird-support]
      • ... emad...@yahoo.com.au [firebird-support]
        • ... 'Leyne, Sean' s...@broadviewsoftware.com [firebird-support]
        • ... Helen Borrie hele...@iinet.net.au [firebird-support]
        • ... Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
          • ... 'Bogdan' bog...@mordicom.si [firebird-support]

Reply via email to