Hello,
I have an 11g database with AL32UTF8 characterset. I am using ODAC 6.7 with Delphi 2009. I have OraCall.OCIUnicode = True and TOraSession.Options.UseUnicode = true.
I created this folder on my windows server: C:\bfiles
I put a file in it called test.txt, which is encoded as UTF8 and has chinese characters.
I created this directory on my database: CREATE OR REPLACE DIRECTORY TEST_DIR AS 'C:\bfiles';
I have this table:
create table bfile_test
(col1 number,
bfile_col bfile,
comment_col varchar2(30);
and I inserted this row:
INSERT INTO bfile_test
VALUES (1, bfilename('TEST_DIR' , 'test.txt'), 'test');
commit;
now, I use a TSmartQuery and do a select * from bfile_test. When this code executes....
var
BF: TBFileField;
s: String;
begin
BF := query.FieldByName('BFILE_COL');
s := BF.AsString;
end;
....S now contains garbled data. I also tried BF.AsWideString - which gives me different data, but still garbled.
Is this a bug or am I doing something wrong?
Thanks,
John