[Lazarus] Encoding with SDF dataset

Marc Santhoff M.Santhoff at web.de
Wed Nov 4 19:59:17 CET 2015

On Mi, 2015-11-04 at 18:49 +0000, Mark Morgan Lloyd wrote:
> Marc Santhoff wrote:
> > Hi,
> > 
> > when trying to us a TSdfDataset connected to a TDatasource and a
> > TDBGrid, only some unicode symbols are shown (those little squares
> > holding four tiny numbers) for string data.
> > 
> > The data files are encoded iso-8859 but I have found no switch for
> > setting the encoding of TDataSource or TSdfDataset. When loading a
> > TFileStream is used, but I did not find a property or method for
> > changing the encoding on the fly in it, either.
> > 
> > How can I fix it?
> In my limited experience depends critically on the version etc. of the 
> OS you're running.

I don't understand. I'm using FreeBSD, but the program will run on

I'm seeking a hook for attaching sth. like "new := ANSI2Unicode(old)",
or a switch for changing the expected encoding in one of those
components involved. Man .csv importers do ask for the encoding,
Openoffice does.

The alternative would be to parse the file and convert each string piece
by piece, showing in a simple TStringGrid - I don't like that idea. ;)

Marc Santhoff <M.Santhoff at web.de>

More information about the Lazarus mailing list