Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Embedded nulls in parameters to server functions
Tue, Jun 13 2006 11:55 PMPermanent Link

Oliver Bock
As I understand it, Delphi strings are 8-bit clean and can contain null
characters.  However when I pass a string containing a null character as
 a parameter to a remote server function it gets truncated at the other
end.  I can work around this by using a Blob instead, but it's
inconvenient.  Is this by design?


  Oliver
Wed, Jun 14 2006 1:04 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Oliver,

<< As I understand it, Delphi strings are 8-bit clean and can contain null
characters.  However when I pass a string containing a null character as  a
parameter to a remote server function it gets truncated at the other end.  I
can work around this by using a Blob instead, but it's inconvenient.  Is
this by design? >>

It's accidentally by design. Smiley The nature of strings in DBISAM are that
they are null-terminated at the engine level, hence the translation back and
forth from Delphi strings results in truncation.  ElevateDB doesn't have
this issue because it uses Delphi strings and widestrings and not
null-terminated strings.  However, I would also recommend against passing
around NULL characters in strings in general. Smiley

--
Tim Young
Elevate Software
www.elevatesoft.com

Image