Problem with sorting in greeks lazarus / 16-Databases ---------------------------------------------------------------------- Pccare247 · 2013-10-30 17:37 Hello again, I would like to make a question, i create a table with greek and english records when i sort my table i discover that greeks not sorting correctly the encoding is utf8 and i use lazarus 0.9.28.2 and fpc2.2.4 ---------------------------------------------------------------------- Ocye · 2013-10-31 11:48 Make sure you compare using the correct unicode functions (e.g. UTF8CompareStr() from unit LCLProc instead of simple CompareStr(), or convert Greek to widestring). Further information can be found here: http://wiki.lazarus.freepascal.org/LCL_Unicode_Support And show some code please if you don't have success. ---------------------------------------------------------------------- Pccare247 · 2013-11-01 20:12 Thanks for relpy but i think the problem was the component i use SQLitepassDb it doesn't seams to work properly with greek characters, now i'm using Sqlite3 component and work fine. Well i would like to ask something else, i 've got another problem. I can't edit for a second time a record. Let me explain, Open my database and find the desire record i edit an post once and works fine, but if i try to edit the same record again it does nothing. That happens to all table of my database not just this one The other table i'm using a grid to edit the records The way i use to find a record if it can't find the record Inserts a new procedure TForm3.Edit1Exit(Sender: TObject); begin  Sqlite3Dataset1.sql:='SELECT * FROM pelates WHERE code='+Edit1.text+';';  Datasource1.DataSet.open;  Datasource2.DataSet.open;  Datasource3.DataSet.open;  Datasource4.DataSet.open;      with Datasource1.Dataset do      begin        If Sqlite3Dataset1code.text=edit1.text then         begin          SQLite3Dataset1.edit;         end;       If Sqlite3Dataset1code.text<>edit1.text then        begin         SQLite3Dataset1.insert;         FieldByName('code').AsString         :=Edit1.Text;         FieldByName('Area').AsString         :='11025';         FieldByName('city').AsString         :='9000';         FieldByName('Sales_man').AsString    :='2004';         FieldByName('Category').AsString     :='299';         FieldByName('Comnunication').AsString:='Δεν εχουμε επικοινωνήσει';        end;      end;  end;                        and the way i Post the Record procedure TForm3.Button1Click(Sender: TObject); begin  Sqlite3Dataset1.post;  Sqlite3Dataset1.ApplyUpdates;  datasource1.dataset.close;  Edit1.setfocus; end;