Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: Saving CSV (on Mac) errors with spaces in file name
From
Phil Schumm <[email protected]>
To
<[email protected]>
Subject
Re: st: Saving CSV (on Mac) errors with spaces in file name
Date
Mon, 5 Aug 2013 10:10:13 -0500
On Aug 3, 2013, at 3:47 PM, Wayne Folta <[email protected]> wrote:
> I believe Import Delimited Text Data is done in Java* and I was guessing that perhaps the export was also done in Java. Sorry for jumping to conclusions! (Sorry for not replying sooner. I just set up a filter to move Statalist postings to one place and haven't quite got used to looking there.)
>
> *I guess that the Import Delimited Text Data is written in Java because the open dialog box is the ugly Java one, not the native MacOS one. I use Default Folder, which customizes the native dialog box in very nice ways. Also, invoking the option also fires up the dedicated GPU, which I assume is a Java Swing thing.
Nick is correct -- no Java here (just one of Stata's dialog boxes, as opposed to the default OS X Open dialog, which is what Default Folder targets). The relevant code may be viewed with
viewsource export_delimited.ado
and replacing lines 175-6:
cmd = sprintf("%s using %s %s %s", pr.op_varlist, pr.filename,
pr.op_if, pr.op_in)
with
cmd = sprintf(`"%s using "%s" %s %s"', pr.op_varlist, pr.filename,
pr.op_if, pr.op_in)
should eliminate the problem. That said, you should never edit Stata's official ado-files (unless you make your own copy, and in that case, you assume full responsibility for the consequences), and I would strongly suggest reporting this issue to Stata tech support so that they can address it.
-- Phil
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/