Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.databases.paradox    |    To crash or not to crash, asks Borland    |    9,834 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 9,160 of 9,834    |
|    Robert Wiltshire to All    |
|    Re: OT (slightly) Paradox --> Word won't    |
|    19 Apr 08 02:57:19    |
      From: nomail@nospam.com              >>Textstream methods with writestring and/or writeline ?       >>Is it possible you have a combination of CR or LF,       >>that is slightly incompatible with the new version ?       >>Typically, for windows programs, CR/LF , or 13/10 is proper combination.              >>Can you open LET file with a small script,       >>and read it in char by char,       >>to see if you have any odd characters in it ?              > scan tc:       > ts.WriteString(tc."L7","\13",tc."L6","\13",tc."L5","\13",tc."L4","\13",       > tc."L3","\13",tc."L2","\13",tc."L1","\13",tc."CITY","       > ",tc."STATE"," ",       > tc."ZIP","\13","\13","Dear ",tc."Dear",",","\13","\13")       > endScan              > Do you spot a difficulty with that?       Personally, I do not like it,       but it might work some of the time,       in some programs.              As I mentioned, typically windows programs expect a       CR/LF sequence as an end of line marker.       CR = ascii value 13 or as an escape sequence \13              The text method writestring, simply outputs what you tell it,       and does not try to add a cr/lf combination.       So, your code is adding the CR, but not the LF.              This might work in some programs,       but it is not typical for windows apps would typically expect.               ts.WriteString(tc."L7","\13",tc."L6","\13",tc."L5","\13",tc."L4","\13",       > tc."L3","\13",tc."L2","\13",tc."L1","\13",tc."CITY","       > ",tc."STATE"," ",       > tc."ZIP","\13","\13","Dear ",tc."Dear",",","\13","\13")              Every time you are putting a \13, I would put a \13\10,       or actually, to be cleaner, I would just call the writeLine method.              ts.writeLine(tc.L7)       ts.writeLine(tc.L6)       ts.writeLine(tc.L5)       ts.writeLine(tc.L4)       ts.writeLine(tc.L3)       ts.writeLine(tc.L2)              The write line method will automatically append the CR/LF sequence to the       end of the string,       which then makes it a line.                     > Also, can you say something more about reading the file       > character by character? I don't know what you mean by that.              By that I meant,       open up your file with a textstream variable              ts.open(stFilename)       ts.readchar(stChar)       and then test each character of the file for its ansicode              > I do know that the text looks fine if I open it in notepad.       Understood. Notepad probably adjusts for the non standard format,       rather than insisting that the format be proper.              Unix files simply have the LF character,       ascii value of 10, as the end of line marker.                     Hope this helps       Robert Wiltshire              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca