Subject Re: Problem with TMemoField and ISO8859_1 charset blob field in RAD Studio XE / IBX
Author ipai1
Thanks, Woody.

I tried setting "LC_CTYPE=ISO8859_1" in the params property of the TIBDatabase but it made no difference. That was the only vaguely relevant param option I could find - is that what you meant?

I haven't been able to find the relevant post from Peter Below. Still looking...



--- In, "Woody" <woody-tmw@...> wrote:
> From: "ipai1" <user001@...>
> > G'day all...
> >
> > I have been having fun porting a Delphi application from BDS2006 (no
> > unicode) to RAD Studio XE (unicode as default) with the corresponding
> > shipped version of IBX.
> >
> > The Firebird database and client library is version 2.5 but the problem
> > also occurs with 2.1. I am thinking it might be an IBX issue, but I
> > thought I'd start here.
> >
> > The field causing the problem is defined as "BLOB SUB_TYPE 1 SEGMENT SIZE
> > 80" with ISO8859_1 charset and collation. The corresponding dynamic field
> > created in the Delphi dataset is a TMemoField, but when I try to access
> > the MemoField.AsString (or MemoField.AsText) property, the string returned
> > has a null in every second character. It looks to me like the non-unicode
> > charset is being incorrectly treated as unicode.
> >
> > I have worked around the problem for the moment by processing the string
> > to remove every second (null) character, but I'd prefer to get the right
> > result in the first place. Has anyone else encountered this problem?
> >
> IIRC, you must set the character code property of the TIBDatabase explicitly
> in order to overcome this problem. I remember seeing a post by Peter Below
> in one of the Delphi groups about this problem.
> Woody (TMW)