[Lazarus] Sets not implemented??
dominique at savagesoftware.com.au
Sat Jul 26 00:25:40 CEST 2008
Op vrijdag 25-07-2008 om 09:35 uur [tijdzone -0300], schreef Osvaldo
> ubuntu 8.04
> fpc 2.2.3
> lazarus gtk2 r15343
> firebird 2.0.4 win1252
> components tested: uib + uibdataset ; uib + fbdataset ; sqldb + sqlquery
> characters 'ã', 'á', 'Á' (...) apear diferent in lazarus and flamerobin
> and ibeasy. Ibeasy and flamerobin show the same form, diferent from
> lazarus dataware componets.
> When i enter from flamerobin or ibeasy (via wine) the characters are
> showed normal in flamerobin and ibeasy but apear how squares with X
> (#225 i think) in lazarus dataware components.
This is the same question as in the 'Unicode and DBAware' thread. The
strings in the database are stored in some local character set (probably
iso-8859-1) by Ibeasy and Flamerobin. But the latest Lazarus version
expect all strings to be in utf-8 encoding.
So you have two options: store all data in the database using utf-8. If
Flamerobin and Ibeasy do not support utf-8, you could consider using
IBExpert, for example. (Windows only)
Or you could convert all data read from the dataset from the encoding
used by Flamerobin and Ibeasy to the utf8-encoding. And offcourse, if
you store data into the database, you have to convert the data from
utf-8 to the other encoding. How you can do that you can find in my mail
in the DBAware-thread. Or you could use the OnGetText and OnSetText
properties from the TStringFields you are using.
I think it's obvious that if you have full control over the database,
the first option is the best one.
There is a change that the second option will be automated in fpc 2.4.0
or 2.2.4, but that's hard to say now.
And I think that, especially when Lazarus 0.9.26 is released, we'll get
this question very often. Maybe something to mention in the releasenotes
or the FAQ?
More information about the Lazarus