If you use File IO to write out this string: strLine1 & RETURN & strLine2 &
RETURN and then open the resulting file under Mac OS with SimpleText,
you'll be seeing properly formatted text, with a line break after strLine1
and strLine2. If you do the same under Windows, the RETURN constant is
still just one character, decimal 13, but Windows apps expect it to be
followed by Line Feed, character decimal 10. Some applications, e.g. Word
2000, will automatically insert a LF after each CR. Open your file in Word,
and you'll probably see properly formatted lines. Other apps, e.g. Notepad,
will see a CR (decimal 13) and if it is not followed by a LF (10), will not
break a line at that point. And without CR being interpreted as a line
break, the app has no other choice but to display it by itself, hence the
rectangles.
Before outputting your string, run a repeat loop to (1) zap all LF,
NumToChar(10) characters that may be there from your other processing, and
then (2) insert a NumToChar(10) after every NumToChar(13).
I wish Director's RETURN contstant changed to a two-character sequence when
outputting under Windows, but I guess it wouldn't really be a constant
then, would it?
Slava
>At 12:01 AM 6/10/01 +0200, clars danvold wrote:
>>hello All
>>
>>(D8.5, Win98)
>>I am using fileIO to save a text to a file. Everything works, except for
>>the fact that the resulting file has no linebreaks/ carriage returns,
>>only the
>> boxes that Windows uses to say " I don't understand this char".
>>
>>I've tried setting the line breaks in the text with RETURN,
>>numToChar(13), and numToChar(10). Same result.
>>
>>The textfile is written with fileIO's writeString() method.
>>
>>What am I missing?
>>
>>regards,
>>Clars Danvold
>
>
>[To remove yourself from this list, or to change to digest mode, go to
>http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
>email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
>Lingo-L is for learning and helping with programming Lingo. Thanks!]
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo. Thanks!]