Hi,
I have a Firebird database (using UTF8 encoding). I connect to the database with TIBConnection component and I set TIBConnection.CharSet to 'UTF8'. Now I have the following problem with displaying values from char(n) columns:
In the database I have a column:
code char(3)
I insert a value to this column, e.g. 'ABC'. When I display the value of this column in FlameRobin, it works correctly, there is 'ABC'. But when I display the value in DBGrid or other database components, there is 'ABC ', so it added 9 spaces behind the text.
The same problem occurs when I assign the value of the column to the variable:
var A: string;
.
.
.
A:=SQLQuery1.FieldByName('Code').AsString;
In A there isn't 'ABC', but there is 'ABC '. I know I can simply delete these unwanted spaces, but is there another solution (better and more comfortable) how to get rid of these additional spaces?