ParadoxDataset with ISO_8859_7 enconded paradox file? lazarus / 16-Databases ---------------------------------------------------------------------- dpap · 2025-02-24 19:35 My paradox files are encoded as ISO_8859_7 (Greek). Using paradoxDataset I can open and display the contents of my paradox files but, as I understood, it not support ISO_8859_7 encoding and treats it as default (UTF8) resulting to garbages for greek characters. in LConvEnconding file I see: //encoding names const   EncodingUTF8 = 'utf8';   EncodingAnsi = 'ansi';   EncodingUTF8BOM = 'utf8bom'; // UTF-8 with byte order mark   EncodingUCS2LE = 'ucs2le'; // UCS 2 byte little endian   EncodingUCS2BE = 'ucs2be'; // UCS 2 byte big endian   EncodingCP1250 = 'cp1250';   EncodingCP1251 = 'cp1251';   EncodingCP1252 = 'cp1252';   EncodingCP1253 = 'cp1253';   EncodingCP1254 = 'cp1254';   EncodingCP1255 = 'cp1255';   EncodingCP1256 = 'cp1256';   EncodingCP1257 = 'cp1257';   EncodingCP1258 = 'cp1258';   EncodingCP437 = 'cp437';   EncodingCP850 = 'cp850';   EncodingCP852 = 'cp852';   EncodingCP865 = 'cp865';   EncodingCP866 = 'cp866';   EncodingCP874 = 'cp874';   EncodingCP932 = 'cp932';   EncodingCP936 = 'cp936';   EncodingCP949 = 'cp949';   EncodingCP950 = 'cp950';   EncodingCPMac = 'macintosh';   EncodingCPKOI8R = 'koi8r';   EncodingCPKOI8U = 'koi8u';   EncodingCPKOI8RU = 'koi8ru';   EncodingCPIso1 = 'iso88591';   EncodingCPIso2 = 'iso88592';   EncodingCPIso3 = 'iso88593';   EncodingCPIso4 = 'iso88594';   EncodingCPIso5 = 'iso88595';   EncodingCPIso7 = 'iso88597';   EncodingCPIso9 = 'iso88599';   EncodingCPIso10 = 'iso885910';   EncodingCPIso13 = 'iso885913';   EncodingCPIso14 = 'iso885914';   EncodingCPIso15 = 'iso885915';   EncodingCPIso16 = 'iso885916';  How can I achive to read contents as ISO_8859_7 , please? ---------------------------------------------------------------------- sstvmaster · 2025-02-25 06:27 Maybe QuoteEncodingCPIso7 = 'iso88597';is the right one? ---------------------------------------------------------------------- paweld · 2025-02-25 06:49 After opening the DataSet, you need to assign OnGetText (for displaying text) and OnSetText (for updating content) events for all text fields that will automatically change encoding. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i unit Unit1; {$mode objfpc}{$H+} interface uses  Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, LConvEncoding, DB; type   { TForm1 }   TForm1 = class(TForm)    Button1: TButton;    MSQuery1: TMSQuery;    procedure Button1Click(Sender: TObject);  private    procedure GetText(Sender: TField; var aText: string; DisplayText: boolean);    procedure SetText(Sender: TField; const aText: string);  public   end; var  Form1: TForm1; implementation {$R *.lfm} { TForm1 } procedure TForm1.GetText(Sender: TField; var aText: string; DisplayText: boolean);begin  aText := ISO_8859_7ToUTF8(Sender.AsString);end; procedure TForm1.SetText(Sender: TField; const aText: string);begin  Sender.AsString := UTF8ToISO_8859_7(aText);end; procedure TForm1.Button1Click(Sender: TObject);var  i: integer;  MyDataSet: TDataSet;begin  MyDataSet.SQL.Text := ' select * from greek_paradox_table ';  MyDataSet.Open;  //add the following code  for i := 0 to MyDataSet.Fields.Count - 1 do  begin    if MyDataSet.Fields[i].DataType in [ftString, ftMemo] then    begin      MyDataSet.Fields[i].OnGetText := @GetText;      MyDataSet.Fields[i].OnSetText := @SetText;    end;  end;end; end. ---------------------------------------------------------------------- dpap · 2025-02-25 07:23 Thanks for your replies. I tried them but the problem persists. Neither EncodingCPIso7 = 'iso88597' as FTargetEncoding or FInputEncoding nor the onGetText shows Greek! EDIT: In the component instructions says "The encoding of text fields used in the file is displayed in the read-only property InputEncoding. It is automatically converted to the encoding given in property TargetEncoding which defaults to "UTF8". In the case that text fields must be encoded differently specify the codepage name here, e.g. "CP1252" for Western Europe code page (use the (case-insensitive) names given in the LazUtils unit lconvencoding)." I tried to set TargetInput to 'iso88597' or 'CP1253' but no success. ---------------------------------------------------------------------- wp · 2025-02-25 09:19 Please post a small Paradox table showing the issue. ---------------------------------------------------------------------- dpap · 2025-02-26 09:56 Here is a small table with data in Greek ---------------------------------------------------------------------- paweld · 2025-02-26 11:08 sample in attachment ---------------------------------------------------------------------- dpap · 2025-02-26 11:25 Seems to be the SOLUTION! but I can't find paradoxlaz. Where can I find it? ---------------------------------------------------------------------- paweld · 2025-02-26 11:48 Download from: https://sourceforge.net/projects/tpdx/ but this component only allows you to work in read-only mode ---------------------------------------------------------------------- dpap · 2025-02-26 12:00 YES!  THIS IS THE SOLUTION to my problem. I am grateful to you.