There is a Oracle 9 db with CL8MSWIN1251 codepage setting and Delphi XE with some edit fields.
I need to convert project made in Delphi 7 to Delphi Xe project to use and able to see UTF8 data.
So I opened dpr file using Delphi XE and it converted automatically to dproj. But when I try to insert into db some data, I got question symbols ("?") instead of some utf8 chars. I tried to convert data from Edits (Tedit) using ansitoUTF8(edit1.text). And it doesn't work. Then I started a new project in XE, quickly added some edits to check ansitoutf8 function and it works well and inserts data to same db and into same table.
There is one rule: I cannot change codepage setting in db.
begin
adoquery1.close;
adoquery1.sql.text:='insert into table (data1,data2) values ('+#39+ansitoUTF8(edit1.text)+#39+','+#39+ansitoUTF8(edit2.text)+#39+')';
adoquery1.execsql;
end;
Any suggestions?