🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.web
Article #778

Re: HANS G Re: How to get innerHTML for body of TCppWebBrowser Doc

#778
From: Hans Galema
Date: Fri, 10 Mar 2006 11:52
25 lines
1864 bytes
caleb wrote:

>> char *text = loadfileinmemory ( path, &filelen );
>>
>> if ( strlen(text) != filelen )
>>	ShowMessage ( "file contains null char");

> What do you if this is the case to remove the null char(s)?

Replace them by spaces.

  char *ptr = text;

  int len = filelen;

  while ( --len )
	{
	if ( !*ptr ) *ptr = ' ';
         ptr++;
         }

I start vaguely to remember that there were indeed null chars in a html-page
that I once grabbed from amazone.com.

Hans.
Technical Details
Message-ID: <44116944$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <4410459e$1@newsgroups.borland.com> <44104e98$1@newsgroups.borland.com> <441051bc$1@newsgroups.borland.com> <4410545d$1@newsgroups.borland.com> <44106c98$1@newsgroups.borland.com> <44108920$1@newsgroups.borland.com> <44108edc@newsgroups.borland.com> <441093b3$1@newsgroups.borland.com> <44109964$1@newsgroups.borland.com> <441131b1$1@newsgroups.borland.com> <44116689@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,485d3d8ad6145f77
X-Google-Attributes: gidfeeec,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Fri, 10 Mar 2006 12:52:22 +0100
From: Hans Galema <notused@notused.nl>
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.internet.web
Subject: Re: HANS G Re: How to get  innerHTML  for body of TCppWebBrowser
 Doc
References: <4410459e$1@newsgroups.borland.com> <44104e98$1@newsgroups.borland.com> <441051bc$1@newsgroups.borland.com> <4410545d$1@newsgroups.borland.com> <44106c98$1@newsgroups.borland.com> <44108920$1@newsgroups.borland.com> <44108edc@newsgroups.borland.com> <441093b3$1@newsgroups.borland.com> <44109964$1@newsgroups.borland.com> <441131b1$1@newsgroups.borland.com> <44116689@newsgroups.borland.com>
In-Reply-To: <44116689@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 145.98.201.248
Message-ID: <44116944$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1141991748 145.98.201.248 (10 Mar 2006 03:55:48 -0700)
Lines: 25
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail