DOS text from a Mac app 
Author Message
 DOS text from a Mac app

I need to output a text file (using textoutputstream) that a Windows machine
can read.  Everything is pretty basic and straightforward but I'm not
getting the line returns correct.
The text file in windows is all on one line.
I can't remember if I need to put a chr(10) or chr(13) or something else on
the end of each line.

Any help would be appreciated.

--
Bruce Johnson



Tue, 04 May 2004 08:40:53 GMT  
 DOS text from a Mac app

Quote:
>I can't remember if I need to put a chr(10) or chr(13) or something else
>on the end of each line.

The DOS/Windows world uses a CR-LF pair--chr(10) chr(13)--to indicate
end-of-line.

The Mac world uses a CR alone--chr(13). The Unix world uses a linefeed
alone--chr(10).

--
"Quand la morale triomphe, il se passe des choses tres vilaines."
Literature. Art. Photography. Forums. Shareware. Kink. Sex.
All at: http://www.xeromag.com/franklin.html



Tue, 04 May 2004 11:46:53 GMT  
 DOS text from a Mac app
So the question becomes, how do I write the line of code to get a
DOS/Windows machine to see the text correctly.

My code looks like this.

Outstream.writeline("a bunch of text here..." + chr(10) + chr(13))

This doesn't seem to work.

What am I missing

--
Bruce Johnson



Wed, 05 May 2004 10:07:59 GMT  
 DOS text from a Mac app

Quote:
>Outstream.writeline("a bunch of text here..." + chr(10) + chr(13))

The "writeline" method writes a line of text with a Mac end-of-line (chr(13))
at the end.

Instead of using the "writeline" method, use the "write" method:

Outstream.write("a bunch of text here..." + chr(10) + chr(13))

You'll need to handle the end-of-line yourself if your goal is to write DOS
text files from a Mac.

--
"Quand la morale triomphe, il se passe des choses tres vilaines."
Literature. Art. Photography. Forums. Shareware. Kink. Sex.
All at: http://www.xeromag.com/franklin.html



Wed, 05 May 2004 11:00:50 GMT  
 DOS text from a Mac app

Quote:

> Outstream.writeline("a bunch of text here..." + chr(10) + chr(13))

Outstream.delimiter=chr(10)+chr(13)

Than you can use writeline.

Mfg
Christian

--
Spiel des Lebens 3.0 ist fertig!
Jetzt auch fr MacOS X

http://www.christians-software.de (Kostenlose Mac/Win Software)



Wed, 05 May 2004 19:50:05 GMT  
 DOS text from a Mac app

Quote:

> >Outstream.writeline("a bunch of text here..." + chr(10) + chr(13))

> The "writeline" method writes a line of text with a Mac end-of-line (chr(13))
> at the end.

> Instead of using the "writeline" method, use the "write" method:

> Outstream.write("a bunch of text here..." + chr(10) + chr(13))

> You'll need to handle the end-of-line yourself if your goal is to write DOS
> text files from a Mac.

TextOutputStream has a property called Delimiter. Set that to

TOS.Delimiter = chr(10) + chr(13)

.. and RB will write the proper line ends.

--
"In a world full of lies/That tug at the truth
 I'm taking no sides/Now I recognize you..." -DS



Thu, 06 May 2004 08:29:57 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. DOS TEXT to Mac ttxt converter needed

2. Reading a DOS text file and writing out Mac

3. DOS Clipper app -> visual app

4. DOS Clipper app -> visual app

5. Migrating DOS/Clipper Apps to Windows/Clipper Apps

6. DOS Box/Full screen from DOS app in Windows

7. Q: Detecting if DOS-app in Wondows FUllscreen or Windowed DOS-box

8. OT: Windows Text vs DOS Text

9. Building apps for Mac OS X only

10. Mac OS X : Volume(0) with app on the Desktop

11. invisible app. under Mac OS

12. Cross-compiling PC-to-Mac with App Builder?

 

 
Powered by phpBB® Forum Software