PC adds formatting to .txt file. (REALbasic getting started Mailinglist archive)
Back to the thread list
Previous thread: Control versus Variant
Next thread: CDATA and updating
| PC adds formatting to .txt file. |
| Date: 14.10.06 01:12 (Fri, 13 Oct 2006 18:12:15 -0600) |
| From: Robert Poland |
|
Hi,
I have a program that creates a text file. On the Mac the file created reads as expected. But if I pass the .txt file to a PC red it and save it then pass it back to the Mac it has 3 lines of formatting added to the original file. Could this be normal PC junk or am I doing something wrong? Robert Poland <email address removed> _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html> |
| Re: PC adds formatting to .txt file. |
| Date: 14.10.06 01:19 (Fri, 13 Oct 2006 18:19:38 -0600) |
| From: Norman Palardy |
|
On Oct 13, 2006, at 6:12 PM, Robert Poland wrote: > Hi, > > I have a program that creates a text file. > > On the Mac the file created reads as expected. But if I pass > the .txt file to a PC red it and save it then pass it back to the > Mac it has 3 lines of formatting added to the original file. > > Could this be normal PC junk or am I doing something wrong? > > Robert Poland > <email address removed> This might have to do with the fact that a Mac and PC use different line endings The Mac uses chr(13) and Windows uses chr(13) + chr(10) _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html> |
| Re: PC adds formatting to .txt file. |
| Date: 14.10.06 01:32 (Fri, 13 Oct 2006 18:32:37 -0600) |
| From: Robert Poland |
|
On Oct 13, 2006, at 6:19 PM, Norman Palardy wrote: > > On Oct 13, 2006, at 6:12 PM, Robert Poland wrote: > >> Hi, >> >> I have a program that creates a text file. >> >> On the Mac the file created reads as expected. But if I pass >> the .txt file to a PC red it and save it then pass it back to the >> Mac it has 3 lines of formatting added to the original file. >> >> Could this be normal PC junk or am I doing something wrong? >> >> Robert Poland >> <email address removed> > This might have to do with the fact that a Mac and PC use different > line endings > > The Mac uses chr(13) and Windows uses chr(13) + chr(10) Norman, I'm splitting into an array with chr(13) and that seems to work. Here's the first three lines; {\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil Courier New;}} {\colortbl ;\red0\green0\blue0;} \viewkind4\uc1\pard\cf1\f0\fs18 EMPLOYEE TIME SHEET\par I notice that all subsequent lines have a "\par" at the end (I assume that means paragraph). REALbasic seem to deal with the "\par" but not with the extra lines. Robert Poland <email address removed> _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html> |
| Re: PC adds formatting to .txt file. |
| Date: 14.10.06 01:34 (Fri, 13 Oct 2006 19:34:33 -0500) |
| From: Rafael Vallejo GMAIL |
|
What formating, can you send a sample? PCs adds chr(13)+chr(10) while
Mac just send not shure just chr(10) or chr(13) at the end of a line can this be the problem? Rafael Robert Poland escribió: > Hi, > > I have a program that creates a text file. > > On the Mac the file created reads as expected. But if I pass the .txt > file to a PC red it and save it then pass it back to the Mac it has 3 > lines of formatting added to the original file. > > Could this be normal PC junk or am I doing something wrong? > > Robert Poland > <email address removed> > _______________________________________________ > Unsubscribe or switch delivery mode: > <http://www.realsoftware.com/support/listmanager/> > Search the archives of this list here: > <http://support.realsoftware.com/listarchives/lists.html> _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html> |
| Re: PC adds formatting to .txt file. |
| Date: 14.10.06 01:36 (Fri, 13 Oct 2006 17:36:32 -0700) |
| From: Terry Ford |
|
On Oct 13, 2006, at 5:19 PM, Norman Palardy wrote: > > On Oct 13, 2006, at 6:12 PM, Robert Poland wrote: > >> Hi, >> >> I have a program that creates a text file. >> >> On the Mac the file created reads as expected. But if I pass >> the .txt file to a PC red it and save it then pass it back to the >> Mac it has 3 lines of formatting added to the original file. >> >> Could this be normal PC junk or am I doing something wrong? >> >> Robert Poland >> <email address removed> > This might have to do with the fact that a Mac and PC use different > line endings > > The Mac uses chr(13) and Windows uses chr(13) + chr(10) Or PC uses rtf and Mac doesn't. _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html> |
| Re: PC adds formatting to .txt file. |
| Date: 14.10.06 01:46 (Fri, 13 Oct 2006 17:46:47 -0700) |
| From: Terry Ford |
|
On Oct 13, 2006, at 5:32 PM, Robert Poland wrote: > Here's the first three lines; > > {\rtf1\ rtf1 That should clue everyone in. Too bad Rb still doesn't have rtf for Mac. _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html> |
| Re: PC adds formatting to .txt file. |
| Date: 14.10.06 05:06 (Fri, 13 Oct 2006 22:06:21 -0600) |
| From: Norman Palardy |
|
On Oct 13, 2006, at 6:32 PM, Robert Poland wrote: > > On Oct 13, 2006, at 6:19 PM, Norman Palardy wrote: > >> >> On Oct 13, 2006, at 6:12 PM, Robert Poland wrote: >> >>> Hi, >>> >>> I have a program that creates a text file. >>> >>> On the Mac the file created reads as expected. But if I pass >>> the .txt file to a PC red it and save it then pass it back to the >>> Mac it has 3 lines of formatting added to the original file. >>> >>> Could this be normal PC junk or am I doing something wrong? >>> >>> Robert Poland >>> <email address removed> >> >> This might have to do with the fact that a Mac and PC use >> different line endings >> >> The Mac uses chr(13) and Windows uses chr(13) + chr(10) > > Norman, > > I'm splitting into an array with chr(13) and that seems to work. > > Here's the first three lines; > > {\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil Courier > New;}} > {\colortbl ;\red0\green0\blue0;} > \viewkind4\uc1\pard\cf1\f0\fs18 EMPLOYEE TIME SHEET\par > > I notice that all subsequent lines have a "\par" at the end (I > assume that means paragraph). > REALbasic seem to deal with the "\par" but not with the extra lines. It's an RTF File ? This is a LOT more work than just a few lines of text _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html> |
Links
MBS REAL studio tutorial videos - Pfarrgemeinde St. Arnulf Nickenich