At 6:12 PM -0700 7/28/2001, Sivakatirswami wrote:
>I am trying to dump text from an MC field to a raw text file which has
>char(10) in all places where we have a "CR" entered under script control.
> [...]
>a \n  b \n  c  \n
>
>But, a routine that saves the field string
>
>a
>b
>c
>
>to a file returns this string in the file:
>
>a  \r  b \r c \r
>
>When read by a Unix formatter? So, what's up?


When you write a text file, MC auto-converts line endings to the
appropriate ones for the current platform. You need to write a binary file
if you want to keep the line endings intact without translation:

  put field "Whatever" into URL "binfile:someFileOrOther.txt"

or

  open file "someFileOrOther.txt" for binary write
  write field "Whatever" to file "someFileOrOther.txt"
  close file "someFileOrOther.txt""

--
Jeanne A. E. DeVoto ~ [EMAIL PROTECTED]
http://www.runrev.com/
Runtime Revolution Limited - Power to the Developer!



Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.

Reply via email to