From: David G. <go...@py...> - 2004-06-15 12:58:26
|
David Priest wrote: > On Mon, 14 Jun 2004 20:37:50 -0700, > <doc...@li...> wrote: >> +``header`` : CSV data ... > > Commercial database output might very well use oddball CSV output > that is incompatible with ReST. In particular, it may use line-ends > that aren't compatible with that used by the users' ReST, > *especially* if it's coming from a mainframe; or it may use field > separator or quote characters that are whitespace. OK, then how about we settle on Excel format with "skipinitialspace=True" for "header"? Whitespace as field separators I can believe (TAB-separated data is very common). But whitespace as *quote* characters? Do you have an actual example of this? >> -``escape`` : [char | "tab" | "space" | "lf" | "ff" | "vt" | "hex ##"] ... >> + .. We should be able to do without this one. > > Sweet Jesus, no. Doubling-up CSV characters is apparently NOT an > uncommon thing. Re-read the checkin message. Or better yet, do a CVS up (or check <http://docutils.sf.net/sandbox/dpriest/csvtable/csvtable.txt> on the web). Diffs can be quite confusing; they aren't always minimal, sensible, or obvious at first (or third) glance. I did *not* delete the "escape" option, nor did I indicate that "We should be able to do without" escape. That comment refers to "lineend", which it turns out we *can* do without (by reading in the data and using .splitlines(); I tested all possible line endings to prove to myself it wasn't necessary). > I also spotted something that might indicate that whitespace as > field delimiter has been removed. Again, not the case. I just added a couple of comments: .. Would whitespace other than tab or space ever be used? I doubt it. .. Instead of "hex ##", use the same syntax as the "unicode" directive. I don't think the complexity (implementation, documentation, and conceptual) of "lf", "ff", etc. is worthwhile. Rather than all that, a simpler definition (char, character syntax as in the "unicode" directive", plus "tab" & "space" just for delimiters) would be better. -- David Goodger <http://python.net/~goodger> |