extra space
Posted: Sun 01 Oct 2017 17:04
Hello,
Berlin + odac 10.1.3
I see extra space in DBGrid (that I don't expect), I did the demo for your
It is a simple example where I have AL32UTF8 character set in my database and I created a table with 2 bytes Char column. Next I inserted a symbol that takes 2 bytes in AL32UTF8. Next I switched off TrimFixedChar parameter. When I select from this table I expect to see 1 char without extra space because the field for 2 bytes and my symbol takes 2 bytes but I see 2 chars like my symbol takes 1 byte.
Berlin + odac 10.1.3
I see extra space in DBGrid (that I don't expect), I did the demo for your
Code: Select all
procedure TForm1.Button1Click(Sender: TObject);
begin
OraSession1.Connect;
OraQuery1.SQL.Text := 'create table test_tab(x char(2 byte))';
OraQuery1.ExecSQL;
OraQuery1.SQL.Text := 'insert into test_tab values(''щ'')';
OraQuery1.ExecSQL;
OraQuery1.SQL.Text := 'select x, dump(x), (select value from v$nls_parameters where parameter = ''NLS_CHARACTERSET'') from test_tab';
OraQuery1.Options.TrimFixedChar := False;
OraQuery1.Open;
ShowMessage('"' + OraQuery1.Fields[0].asstring + '" ' + OraQuery1.Fields[1].asstring + ' ' + OraQuery1.Fields[2].asstring);
// "щ " Typ=96 Len=2: 195,185 AL32UTF8
end;