freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Brian Bruns <camber AT ais.org>
- To: TDS Development Group <freetds AT franklin.metalab.unc.edu>
- Subject: RE: Losing last character of TEXT fields
- Date: Tue, 9 Jul 2002 17:35:42 -0400 (EDT)
On Tue, 9 Jul 2002, Lowden, James K wrote:
> Eric,
>
> Your remarks are on the money. Please ignore my last message. I now like
> your "radical" solution best, because it's both simple and funny.
>
> I should have looked at cs.c, at cs_convert(). I was fixing dblib in
> tdslib, with the consequence of breaking ctlib. The weird termination
> behavior described in the dblib docs shouldn't be embedded in a shared
> library. dbconvert() is what needs attention.
>
> Brian, I'd like to suggest a policy about conversions for the project; if
> you like it then it should be explicitly noted somewhere.
>
> <policy>
> tds_convert copies from src to dest and returns the output data length,
> period. All padding and termination is the responsibilty of the API library
> and is done post conversion. There may be some shared utility padding &
> termination functions, but they're really not "conversion". Trying to do
> anything nonstraightforward in tds_convert will only confuse and confound
> the higher levels, us among them.
> </policy>
I think that dblib was cleaning up before, the difference being we had
tds_convert always null terminating. I like yours better.
> An alternative would be to pass the padding & termination policy argument as
> an enumerated type, which tds_convert would carry out if the basic
> conversion succeeds.
I'm not sure tds has all the info it needs to do this always...for
instance padding, how big is the column? and remember that dbconvert can
be called without a dbproc...better to leave the fixups to the API layer.
>
> You have more experience with this (obviously), and have some idea where
> UTF-8 is taking us, so I'm curious how you see things.
UTF-8 touches more on the dbdatlen() type functions, once you call
*convert() with sizes it's all over but the crying.
> --jkl
>
Brian
-
RE: Losing last character of TEXT fields
, (continued)
- RE: Losing last character of TEXT fields, Brian Bruns, 07/09/2002
- RE: Losing last character of TEXT fields, Lowden, James K, 07/09/2002
- RE: Losing last character of TEXT fields, Eric Deutsch, 07/09/2002
- RE: Losing last character of TEXT fields, Brian Bruns, 07/09/2002
- RE: Losing last character of TEXT fields, Eric Deutsch, 07/09/2002
- RE: Losing last character of TEXT fields, Michael Peppler, 07/09/2002
- RE: Losing last character of TEXT fields, Lowden, James K, 07/09/2002
- RE: Losing last character of TEXT fields, Eric Deutsch, 07/09/2002
- RE: Losing last character of TEXT fields, Lowden, James K, 07/09/2002
- RE: Losing last character of TEXT fields, Eric Deutsch, 07/09/2002
- RE: Losing last character of TEXT fields, Brian Bruns, 07/09/2002
- RE: Losing last character of TEXT fields, ZIGLIO Frediano, 07/10/2002
- RE: Losing last character of TEXT fields, Bill Thompson, 07/10/2002
- RE: Losing last character of TEXT fields, ZIGLIO Frediano, 07/10/2002
- RE: Losing last character of TEXT fields, Thompson, Bill D (London), 07/10/2002
- RE: Losing last character of TEXT fields, Brian Bruns, 07/10/2002
- RE: Losing last character of TEXT fields, Thompson, Bill D (London), 07/10/2002
- RE: Losing last character of TEXT fields, Brian Bruns, 07/10/2002
- RE: Losing last character of TEXT fields, James K . Lowden, 07/10/2002
- RE: Losing last character of TEXT fields, Thompson, Bill D (London), 07/10/2002
- RE: Losing last character of TEXT fields, ZIGLIO Frediano, 07/10/2002
Archive powered by MHonArc 2.6.24.