[Lazarus] Firebirdsql Characters Compatibility

Osvaldo TCF arquivostcf at gmail.com
Fri Jul 25 18:21:21 CEST 2008


You are right. But...

Pearhaps the problem is in the way of componet get/send data from
database. Not in lazarus.

FirebirdSQL save data as is receved from the client, it use de charset
and the collate for this.

When i create a field with utf8 charset i see correct in all clients
with support utf8: lazarus (use utf8, ever)  and flamerobin (use defined
charset).

The problem is how lazarus send/get data respecting the charset of
component connection. 

Dataset.dataconvert? transliterate? more ideia?

Thanks.




Em Sex, 2008-07-25 às 14:52 +0200, Joost van der Sluis escreveu:
> Op vrijdag 25-07-2008 om 09:35 uur [tijdzone -0300], schreef Osvaldo
> TCF:
> > 
> > environment
> > ubuntu 8.04
> > fpc 2.2.3
> > lazarus gtk2 r15343
> > firebird 2.0.4 win1252
> > components tested: uib + uibdataset ; uib + fbdataset ; sqldb + sqlquery
> > 
> > Problem:
> > 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?
> 
> Joost.
> 
> 
> 
> _______________________________________________
> Lazarus mailing list
> Lazarus at lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus




More information about the Lazarus mailing list