<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix"><br>
</div>
<blockquote
cite="mid:53409657-ab40-a37f-db11-2f42f3e62582@mccallumwhyman.com"
type="cite">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<br>
<blockquote cite="mid:web-6388810@cgp-back-6.mail.zoznam.sk"
type="cite">
<div><lazarus@lists.lazarus-ide.org>I am aware of it. I have not
added all other MBCS because ! I doubt, which are realy used
nowadays.<br>
My guess is that UTF-8 is far most used / supported as
client character set.</lazarus@lists.lazarus-ide.org></div>
<div><lazarus@lists.lazarus-ide.org>No problem to add them if
there will be real demand from users ...</lazarus@lists.lazarus-ide.org></div>
</blockquote>
Perhaps the correct answer is to let the database driver work this
one out rather than have a fixed decision in the FCL.<br>
<br>
I would suggest the following change:<br>
<br>
function TStringField.GetDataSize: Integer;<br>
</blockquote>
<br>
My intention was made TStringField independent from TFieldDef, at
least because we can have FieldDef=nil (for lookup, calculated
fields)<br>
Of course I can introduce class procedure (or regular procedure),
with ACodePage parameter, which will be called from TStringField and
TFieldDef, so all code will be in one place.<br>
<br>
<blockquote
cite="mid:53409657-ab40-a37f-db11-2f42f3e62582@mccallumwhyman.com"
type="cite"> <br>
<br>
In IBX, I have already done this using TIBFieldDef and
TIBStringField as subclasses in order to pass character set
information. However, because TFieldDef.CreateField is
non-virtual, the implementation is not as elegant as it should be.
That is the extra info is added to the TIBStringField as the
dataset is opened</blockquote>
<br>
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
for example ...<br>
(AFAICS Zeos do it in this way also)<br>
<br>
-Laco.<br>
<br>
<blockquote
cite="mid:53409657-ab40-a37f-db11-2f42f3e62582@mccallumwhyman.com"
type="cite"> rather than when the field is created. It is also
less maintainable as the functionality should be in TIBFieldDef
rather than in a different class altogether.<br>
<br>
Making those two methods virtual is the most important change. I
can live with TStringField.GetDataSize as it is because that is
already virtual and a future TIBStringField can readily override
it.<br>
<br>
Tony Whyman<br>
MWA<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
</blockquote>
</body>
</html>