[Lazarus] XPM unsupported format

Graeme Geldenhuys graemeg.lists at gmail.com
Fri Jul 25 11:20:33 CEST 2008

On Thu, 24 Jul 2008 20:06:50 +0200
JoshyFun <joshyfun at gmail.com> wrote:

> Hello,
> I had found part of my problems with the ISO8859-1 database and
> DBAware components, to be more precise the problem of empty strings
> when original data are not empty. The problem is the Utf8ToUnicode in
> the fpc RTL as this function when found an invalid UTF8 sequence
> (because it was originally "codedpage") it simply returns '' without
> any kind of "visual" notification like the usual '????' strings.

Why is there an invalid UTF-8 string?

> I know that an invalid UTF8 sequence ruins the whole string and I do
> not know if should be desirable to continue parsing adding a mask char
> like the '?' one.

You can safely continue parsing. You can even jump to somewhere
into an UTF-8 string and find the next character start.
The problem is that you can no longer reverse without data loss.
OTOH returning an empty string is even more data loss ... .

> PS: Maybe this discussion should be moved to the FPC list ?

The conversion must be somewhere, either in the db controls (lazarus),
or in the db connector (fcl). Because the FCL prefers system encoding it
might be a more lazarus problem.


More information about the Lazarus mailing list