Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Chr(13) / chr(10) in memo fields
Message
 
 
À
17/04/2004 16:00:42
Information générale
Forum:
Visual FoxPro
Catégorie:
XML, XSD
Divers
Thread ID:
00895846
Message ID:
00896185
Vues:
11
As Rick told you, this is *not* a bug. This is MSXML conforming to the XML spec.

Whitespace has to be normalized between different environments -- and CHR(10) is the XML definition of a normalized line break.

But... I'm interested to hear why and where in FoxPro this presents a problem for you, because one of the cool things about FoxPro is its ability to handle cross platform line breaks -- which pre-dates XML usage by quite a few years <s>.

For example, if I do this:

CREATE CURSOR x (onefield m)
APPEND BLANK
REPLACE onefield WITH ;
REPLICATE("this is a test"+CHR(10),20)
MODIFY MEMO onefield

... I will properly see line breaks. Similarly:

STRTOFILE( ;
REPLICATE("this is a test"+ ;
CHR(10),20), "c:\temp\x.txt")
MODIFY FILE c:\temp\x

If I include this information in a stretching report field, or if I bind the field above to an editbox, it should display correctly.

This behavior comes "free" in VFP courtesy of FoxPro 2.x's need to work properly on the Macintosh and Unix platforms <s>.

So, I'm interested ... at which point(s) in your code does the lack of a CHR(13) really create a problem for you?

Although Rick talks about "proper CRLF sequences" these sequences are really only "proper" under Windows <g>. In FoxPro, we're not platform-bound.

I am not chiding you! Because I work in xplat XML and VFP all the time, it's important for me to know exactly where and how switching between different linebreak systems might be a problem for the consumers of my XML output. Thanks in advance for letting me know how, if the consuming application is FoxPro, this presents a problem.

OTOH, I can give you a couple of examples of places where Fox's abilitiy to work this way is a true blessing <s>. Search "linebreak Mac DOS Unix" on the web and you will certainly get the picture.

>L<
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform