From maechler at stat.math.ethz.ch  Fri Mar 17 11:36:52 2006
From: maechler at stat.math.ethz.ch (Martin Maechler)
Date: Fri, 17 Mar 2006 11:36:52 +0100
Subject: [Rd] .Platform$eol.sep ? [Re: "\r" with RSQLite]
In-Reply-To: <20060316145131.GE17669@jessie.research.bell-labs.com>
References: <20060315184534.13623.qmail@web60212.mail.yahoo.com>
	<20060316145131.GE17669@jessie.research.bell-labs.com>
Message-ID: <17434.37188.943713.118662@stat.math.ethz.ch>

[ diverted from R-help to R-devel ]

>>>>> "DJ" == David James <dj at research.bell-labs.com>
>>>>>     on Thu, 16 Mar 2006 09:51:31 -0500 writes:

    DJ> That is a bug, namely, the default end of line on the windows version 
    DJ> should be "\r\n" instead of "\n".  The workaround is to specify 
    DJ> eol="\r\n" in dbWriteTable(), e.g.,

    DJ> dbWriteTable(con, "DF", df, eol = "\r\n")
    DJ> dbReadTable(con, "DF")

    DJ> Hope this helps,

    DJ> --
    DJ> David

    DJ> PS The object .Platform includes path.sep and file.sep but not
    DJ> end of line separator (as of 2.2.0) -- would it make sense to
    DJ> also include eol.sep?

I think it would.  AFAIK, the Macs used to have  "\r" such that

  Unix:    "\n"
  Windoze: "\r\n"
  Mac :    "\r"

but it could well be that this has only been for Mac OS x.y, x <= 9,
i.e., is no longer true for MacOS X (which would behave like `Unix' then).

Brian Ripley is currently enjoying holidays AFAIK; I think he
might want to shed more light on this as well.

Martin



[Rd] .Platform$eol.sep ? [Re: "\r" with RSQLite]
Martin Maechler