Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #7628

Re: Why does ANSI character convert after a function returns is?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!news-1.dfn.de!news.dfn.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From "Wolfgang Riedmann" <wriedmann@gmail.com>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: Why does ANSI character convert after a function returns is?
Date Thu, 18 Dec 2014 07:42:11 +0100
Lines 53
Message-ID <cffba2Fit07U1@mid.individual.net> (permalink)
References <oon39ap05d9juuor4vl76939fvftd08aou@4ax.com>
Mime-Version 1.0
Content-Type text/plain; charset=iso-8859-1
Content-Transfer-Encoding 8bit
X-Trace individual.net ewYm6PYW+nT2dtjgjGVnlwcSViOhfgIyTONxz3JTDVoxUTh7c=
Cancel-Lock sha1:LpSJp4XF5HR7aaaAtl5+4YbcmHE=
User-Agent XanaNews/1.18.1.6
Xref csiph.com comp.lang.clipper.visual-objects:7628

Show key headers only | View raw


Hi Dick,

> This is very weird....I open a HTML source document and replace a
> couple of phrases (which I use as fields) in it. As a test, I store
> the output on disk:

it depends from what functions do you use to read/write the file.

Some of the VO functions do ansi/oem caracter conversion.

This is a comment from the VO help:

"FWrite() and FWrite3 are assumed to handle raw binary data and are not
dependent upon the status of SetAnsi().  FWriteText() and FWrite4(), on
the other hand, are dependent upon SetAnsi()."


Wolfgang

> 
> FUNCTION LoadModelDoc (....) as string
> cSource:=StrTran(cSource,cSearch,cReplace,1)
> WriteString2File("c:\temp\test1.htm",cSource,FALSE)
> RETURN cSource
> 
> Open test1.htm in a webbrowser I correctly see the German
> sz-character:
> 
> Straße 3
> 
> The calling code is like this:
> 
> cSource:=LoadModelDoc(....)
> WriteString2File("c:\temp\test2.htm",cSource,FALSE)
> 
> However, without any changes, simply returning the value, the sz
> character changes to a character looking as a question mark in a
> diamond when I open test2.htm in a browser:
> 
> Stra"-??e 3
> 
> So no dbf storage, just returning a string cSource which is still
> correct in the function called  just before returning it's value
> ...and it is changed directly after!
> 
> How could this happen be and how can I prevent it?
> 
> Dick



-- 

Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Why does ANSI character convert after a function returns is? D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2014-12-17 21:03 +0100
  Re: Why does ANSI character convert after a function returns is? "Valery N." <mustangsoftcom@gmail.com> - 2014-12-17 12:34 -0800
    Re: Why does ANSI character convert after a function returns is? D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2014-12-17 22:58 +0100
      Re: Why does ANSI character convert after a function returns is? "Valery N." <mustangsoftcom@gmail.com> - 2014-12-17 14:42 -0800
        Re: Why does ANSI character convert after a function returns is? D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2014-12-18 23:58 +0100
          Re: Why does ANSI character convert after a function returns is? "Valery N." <mustangsoftcom@gmail.com> - 2014-12-19 02:06 -0800
  Re: Why does ANSI character convert after a function returns is? "Valery N." <mustangsoftcom@gmail.com> - 2014-12-17 12:44 -0800
  Re: Why does ANSI character convert after a function returns is? "Wolfgang Riedmann" <wriedmann@gmail.com> - 2014-12-18 07:42 +0100
  Re: Why does ANSI character convert after a function returns is? Robert van der Hulst <robert@heliks.nl> - 2014-12-18 08:54 +0100
    Re: Why does ANSI character convert after a function returns is? D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2014-12-18 23:45 +0100
      Re: Why does ANSI character convert after a function returns is? "Wolfgang Riedmann" <wriedmann@gmail.com> - 2014-12-19 08:25 +0100
        Re: Why does ANSI character convert after a function returns is? "Valery N." <mustangsoftcom@gmail.com> - 2014-12-19 02:14 -0800
        Re: Why does ANSI character convert after a function returns is? D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2014-12-19 12:04 +0100
      Re: Why does ANSI character convert after a function returns is? Robert van der Hulst <robert@heliks.nl> - 2014-12-19 13:17 +0100
        Re: Why does ANSI character convert after a function returns is? D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2014-12-22 16:09 +0100

csiph-web