[Lazarus] Editor Line Numbers (#11625)

Graeme Geldenhuys graemeg.lists at gmail.com
Tue Aug 5 14:32:09 CEST 2008


Hi,

This was brought to my attention in the tiOPF newsgroups.
A Firebird 2 database was created using UTF8 as the default character
set. A field of type CHAR(1) was created.  We inserted a standard ANSI
character. eg:  'a' into the field.

We the field value is displayed in a TDBEdit, it has 3 spaces appended
to the end.  Why?  Is this a SqlDB, Firebird or TDBEdit issue?

We then created a field of type VARCHAR(1) and again inserted the ANSI
character 'a' into it.  TDBEdit now displays it correctly, with no
appending spaces.


I'm going to try and access the field without the TDBEdit control
(from code) to see what it's length is....

We first suspected FBLib to be the issue.  But since then I tried it
in Lazarus using SqlDB and the IBConnection component. No change.  I'm
using Lazarus v0.9.25 r15901M i386-linux-gtk, but this was tested from
Windows as well. FPC version 2.2.3

Below is the database and table details.  Note that we created a
database with a character set of UTF-8.


CREATE DATABASE 'localhost:/tmp/test.fdb'

USER 'SYSDBA' PASSWORD 'masterkey'

PAGE_SIZE 4096

DEFAULT CHARACTER SET UTF8;


CREATE TABLE TABLE1(
  TEXT1 Char(1),
  TEXT2 Char(2),
  TEXT3 Varchar(1),
  TEXT4 Varchar(2)
);




Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/



More information about the Lazarus mailing list