Re: [Lazarus] TDBEdit, TStringField Size, DataSize, DisplayWidth and MaxLength

2016-10-14 Thread LacaK via Lazarus
Dňa 14.10.2016 o 10:08 Tony Whyman via Lazarus napísal(a): On 14/10/16 06:43, LacaK via Lazarus wrote: I do not know IBX, but don't you use overriden TDataSet.InternalInitFieldDefs ? It will allow you put extra info into FieldDef and then use overriden TDataSet.CreateFields, which will allow

Re: [Lazarus] TDBEdit, TStringField Size, DataSize, DisplayWidth and MaxLength

2016-10-14 Thread Tony Whyman via Lazarus
On 14/10/16 06:43, LacaK via Lazarus wrote: I do not know IBX, but don't you use overriden TDataSet.InternalInitFieldDefs ? It will allow you put extra info into FieldDef and then use overriden TDataSet.CreateFields, which will allow you pass extra info from TIBFieldDef into TIBStringField

Re: [Lazarus] TDBEdit, TStringField Size, DataSize, DisplayWidth and MaxLength

2016-10-13 Thread LacaK via Lazarus
I am aware of it. I have not added all other MBCS because ! I doubt, which are realy used nowadays. My guess is that UTF-8 is far most used / supported as client character set. No problem to add them if there will be real demand from users ... Perhaps the correct answer is to let the

Re: [Lazarus] TDBEdit, TStringField Size, DataSize, DisplayWidth and MaxLength

2016-10-12 Thread Tony Whyman via Lazarus
On 11/10/16 19:21, LacaK via Lazarus wrote: I am aware of it. I have not added all other MBCS because ! I doubt, which are realy used nowadays. My guess is that UTF-8 is far most used / supported as client character set. No problem to add them if there will be real demand from users ...

Re: [Lazarus] TDBEdit, TStringField Size, DataSize, DisplayWidth and MaxLength

2016-10-11 Thread LacaK via Lazarus
> > Which FPC version is this likely to be released in?> 3.0.2 - no3.0.4 - ? 3.2.0 - yes> On a quick review of the code, all seems good. Just

Re: [Lazarus] TDBEdit, TStringField Size, DataSize, DisplayWidth and MaxLength

2016-10-11 Thread Martin Schreiber via Lazarus
On Tuesday 11 October 2016 16:19:18 Tony Whyman via Lazarus wrote: > On 11/10/16 15:14, Martin Schreiber via Lazarus wrote: > > case i2 of > > 5,6,8,44,56,57,64: begin > > Agree with 5,6, 44, 56, 57 as two byte character sets. > > 8 doesn't seem to exist (at least in my

Re: [Lazarus] TDBEdit, TStringField Size, DataSize, DisplayWidth and MaxLength

2016-10-11 Thread Tony Whyman via Lazarus
On 11/10/16 15:14, Martin Schreiber via Lazarus wrote: MSEgui uses below code in order to guess the Firebird character size: " FYI, this is the table IBX uses to look up character sets and code pages: CharSetMap: array [0..69] of TCharsetMap = ( (CharsetID: 0; CharSetName: 'NONE';

Re: [Lazarus] TDBEdit, TStringField Size, DataSize, DisplayWidth and MaxLength

2016-10-11 Thread Tony Whyman via Lazarus
On 11/10/16 15:14, Martin Schreiber via Lazarus wrote: case i2 of 5,6,8,44,56,57,64: begin Agree with 5,6, 44, 56, 57 as two byte character sets. 8 doesn't seem to exist (at least in my version). 64 is KOI8U. According to Wikipedia "KOI8-U is an 8-bit character encoding,

Re: [Lazarus] TDBEdit, TStringField Size, DataSize, DisplayWidth and MaxLength

2016-10-11 Thread Tony Whyman via Lazarus
Please look at changes in TRUNK. May be that not all is perfect, but you will see there direction ... -Laco. Which FPC version is this likely to be released in? On a quick review of the code, all seems good. Just one point: GetDataSize seems to acknowledge CP_UTF8 as the only multibyte

Re: [Lazarus] TDBEdit, TStringField Size, DataSize, DisplayWidth and MaxLength

2016-10-11 Thread LacaK via Lazarus
An IBX user came to me with a problem and the problem seems to be a deep seated disconnect between multi-byte character sets, TStringField.Size and TDBEdit.MaxLength. Something needs to give - but I am not sure what should. Firstly documentation: If you go back to Delphi, TField.DataSize

[Lazarus] TDBEdit, TStringField Size, DataSize, DisplayWidth and MaxLength

2016-10-11 Thread Tony Whyman via Lazarus
An IBX user came to me with a problem and the problem seems to be a deep seated disconnect between multi-byte character sets, TStringField.Size and TDBEdit.MaxLength. Something needs to give - but I am not sure what should. Firstly documentation: If you go back to Delphi, TField.DataSize is