At 10:43 AM +0200 14/9/1999, Dominique Busso wrote:
>Answer to [EMAIL PROTECTED] ([EMAIL PROTECTED])
>- message date: 13/09/99 18:22
>
>>When writing to text files, Metacard will convert the "end of line"
>>characters to the appropriate ones for the current platform.
>>
>>If you need the files to be identical on all platforms, try doing a
>>binary write. For example:
>>
>>put tSomedata into url "binfile:/somePath/somefile"
>>
>>Similar conversions are done on reading, so to get exactly what is in
>>the file, use a binary read:
>>
>>put url "binfile:/somePath/somefile" into tSomedata
>>
>>Hope that helps.
>
>Scott & Dave, Thanks. That's what I thought... Know here is my problem:
>- my app needs to generate a file that will be read by a Unix application
>(Solaris), and not but another MC app
>- my app should be able to run on both Mac and Windows, but always
>generate the same file (to be used on Solaris)
>=> how would you do that?
>Thanks again for your help...!
Scott's reply indicated that Metacard uses the unix (ASCII 10)
character internally. So I guees if you use the "return" or "cr"
constants, to build your text and then do a binary write, it should
be fine. (I've always assumed "return" and "cr" are the same. Someone
correct me if I'm wrong.)
To be more certain (I'm a nervous, untrusting type by nature :)), I'd
probably do a "replace return with numToChar(10) in tWhateverText"
just before writing to file.
Good luck
Dave Cragg