text in fields (CR/LF, CR, LF) which is correct?
J. Landman Gay
jacque at hyperactivesw.com
Thu Aug 29 16:54:00 EDT 2002
Kee Nethery <kee at kagi.com> wrote:
> I am pulling text from a database and in the text, I have the word
> "Default", followed by an ASCII 13 which is a CR or return, followed
> by another word "Your". In Hypercard and in Tex-Edit under MacOS X
> this displays as
>
> Default
> Your
>
> In Revolution on MacOSX it displays as
>
> DefaultYour
>
[snip]
> 1. What the ... is going on here?
>
> 2. Why is Revolution ignoring the lone CR initially and then not
> ignoring it later?
>
> 3. Why is Revolution changing the CR LF characters to CR CR?
>
> 4. What does Revolution want to see between the "t" and the "Y" so
> that the "Y" appears to be on the line below the "t"?
>
> 5. Is there some setting I should use that will cause Revolution to
> pay attention to returns in text fields without having to paste into
> a text editor and then copy them back?
>
> 6. Is there some hack, some magic moves I can perform in script to
> get Revolution to display the lone returns?
Because of the cross-platform capabilities, Rev displays ascii 13 and
linefeeds variously on different platforms. To get the proper results no
matter which platform the stack is on, try:
replace numtochar(13) with cr in fld <myFld>
By using the built-in "cr" constant, Rev will substitute the right
number of returns and/or linefeeds for whatever OS is running. In other
words, let the engine do the work.
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode
mailing list