<!--
RSS generated by JIRA (4.4#649-r158309) at Tue Jun 18 23:44:13 CDT 2013

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
For example:
http://dev.clojure.org/jira/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=project+%3D+DCSV+AND+resolution+%3D+Unresolved+ORDER+BY+assignee+ASC%2C+priority+DESC&tempMax=1000&field=key&field=summary
-->
<!-- If you wish to do custom client-side styling of RSS, uncomment this:
<?xml-stylesheet href="http://dev.clojure.org/jira/styles/jiraxml2html.xsl" type="text/xsl"?>
-->
<rss version="0.92">
    <channel>
        <title>Clojure JIRA</title>
        <link>http://dev.clojure.org/jira/secure/IssueNavigator.jspa?reset=true&amp;jqlQuery=project+%3D+DCSV+AND+resolution+%3D+Unresolved+ORDER+BY+assignee+ASC%2C+priority+DESC</link>
        <description>An XML representation of a search request</description>
                <language>en-us</language>
                        <issue start="0" end="4" total="4"/>
                <build-info>
            <version>4.4</version>
            <build-number>649</build-number>
            <build-date>25-07-2011</build-date>
        </build-info>
<item>
            <title>[DCSV-4] \return as record separator with unquoted fields is read as part of the field</title>
                <link>http://dev.clojure.org/jira/browse/DCSV-4</link>
                <project id="10074" key="DCSV">data.csv</project>
                        <description>&lt;p&gt;This regards the gray area of being &quot;more forgiving.&quot; If I understand RFC 4180 correctly, I want to suggest substituting one bit of forgiveness for another: rather than supporting unquoted, multi-line cell values, I suggest supporting CSVs with just \return as the record-separator. Would you accept a patch for that?&lt;/p&gt;

&lt;p&gt;A file with \return as record-separator is interpreted by read-csv as a single row like (&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;Header1&amp;quot; &amp;quot;Header2\rval1&amp;quot; &amp;quot;val2&amp;quot;&amp;#93;&lt;/span&gt;). I believe the RFC only allows fields to contain CR and LF when they&apos;re &lt;tt&gt;escaped&lt;/tt&gt; (i.e., surrounded in double quotes). See the ABNF at the end of &lt;a href=&quot;http://tools.ietf.org/html/rfc4180#section-2&quot;&gt;section 2&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;As far as implementation, I believe this would require wrapping any Reader w/o markSupported in one that does, so that the LF following a CR can be consumed when present.&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;I&amp;#39;ve classified this as a major defect because I ran into a \return-delimited file as soon as I passed a CSV from a Linux machine to a Windows machine, so I&amp;#39;m guessing these files are common. Feel free to reclassify.&amp;#93;&lt;/span&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="15777">DCSV-4</key>
            <summary>\return as record separator with unquoted fields is read as part of the field</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="jonase">Jonas Enlund</assignee>
                                <reporter username="duelin_markers">John Hume</reporter>
                        <labels>
                    </labels>
                <created>Wed, 24 Oct 2012 13:55:57 -0500</created>
                <updated>Wed, 24 Oct 2012 15:00:49 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="29795" author="jonase" created="Wed, 24 Oct 2012 15:00:49 -0500"  >&lt;p&gt;&amp;gt; rather than supporting unquoted, multi-line cell values, I suggest supporting CSVs with just \return as the record-separator. Would you accept a patch for that?&lt;/p&gt;

&lt;p&gt;Sounds good to me.&lt;/p&gt;

&lt;p&gt;&amp;gt; As far as implementation, I believe this would require wrapping any Reader w/o markSupported in one that does&lt;/p&gt;

&lt;p&gt;I think that&apos;s ok, since BufferedReader supports it.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[DCSV-5] No option for parsing into maps</title>
                <link>http://dev.clojure.org/jira/browse/DCSV-5</link>
                <project id="10074" key="DCSV">data.csv</project>
                        <description>&lt;p&gt;I imagine a very common use case for parsing CSVs is to get the output as a sequence of maps. I&apos;m happy to provide a patch for this but wanted to make sure I had the right design.&lt;/p&gt;

&lt;p&gt;My initial idea is to add another option to read-csv with the name :headers which can be a sequence of values, or a flag such as :first-row. Presumably though we ought to also support using the first row as keywords rather than strings, so I&apos;m not sure whether that ought to be another option or a different flag (e.g., :first-row-keywords).&lt;/p&gt;</description>
                <environment></environment>
            <key id="16197">DCSV-5</key>
            <summary>No option for parsing into maps</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="jonase">Jonas Enlund</assignee>
                                <reporter username="gfredericks">Gary Fredericks</reporter>
                        <labels>
                    </labels>
                <created>Tue, 21 May 2013 11:30:25 -0500</created>
                <updated>Fri, 24 May 2013 12:41:50 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="31129" author="jonase" created="Tue, 21 May 2013 13:28:44 -0500"  >&lt;p&gt;I&apos;ve seen this feature request before so I think that something like this should be added. One approach would be to provide a helper function:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(defn csv-data-&amp;gt;maps [vecs]
  (map zipmap (repeat (first vecs)) (&lt;span class=&quot;code-keyword&quot;&gt;rest&lt;/span&gt; vecs)))

(csv-data-&amp;gt;maps (read-csv reader))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="31148" author="cvkemenade" created="Fri, 24 May 2013 12:41:50 -0500"  >&lt;p&gt;I&apos;ve ran into the same question and prepared a small library to do my csv processing.&lt;br/&gt;
It uses data.csv as a workinghorse, but puts some additional functionality on top of it, such as:&lt;br/&gt;
1. csv-to-map: which does the same as the code above, but also maps strings in the first line to keywords. Furthermore, you can choose to translate the keys to lowercase, which is often needed when submitting the csv-data to a database&lt;br/&gt;
2. csv-columnMap: which does a selection of a subset of columns, renaming of these columns (aka renaming the first line of csv-data.&lt;br/&gt;
3. read-csv: my primary entry point using data.csv + csv-to-map + csv-columnMap&lt;br/&gt;
4. read-csv-lazy:  A lazy variant which takes a processing function to be used in the inner loop (to allow large csv-datasets) &lt;br/&gt;
5. read-csv-to-db: pumping a csv into a database&lt;br/&gt;
6. map-seq-to-csv: mapping a uniform sequence of hashmaps to a dataset that can be written to a csv (first line contains the keys)&lt;/p&gt;

&lt;p&gt;Feel free to reuse parts of the code. You can find the code here:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/cvkem/vinzi.tools/blob/master/vinzi.tools/src/main/clojure/vinzi/tools/vCsv.clj&quot;&gt;https://github.com/cvkem/vinzi.tools/blob/master/vinzi.tools/src/main/clojure/vinzi/tools/vCsv.clj&lt;/a&gt;&lt;/p&gt;

</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[DCSV-6] read-csv can not handle white-space at end of line</title>
                <link>http://dev.clojure.org/jira/browse/DCSV-6</link>
                <project id="10074" key="DCSV">data.csv</project>
                        <description>
&lt;p&gt;When whitespace is present after the closing \&quot; the clojure reader crashes with a weird error.&lt;br/&gt;
It took me some time to notice it was a white-space issue as whitespace is .... not visible.&lt;/p&gt;

&lt;p&gt;See an example of the error below.&lt;/p&gt;

&lt;p&gt;=&amp;gt; (read-csv (java.io.StringReader. &quot;\&quot;a\&quot; &quot; ))&lt;br/&gt;
Exception CSV error (unexpected character:  )  clojure.data.csv/read-quoted-cell (csv.clj:36)&lt;br/&gt;
=&amp;gt; (read-csv (java.io.StringReader. &quot;\&quot;a\&quot;&quot; ))&lt;br/&gt;
(&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;a&amp;quot;&amp;#93;&lt;/span&gt;)&lt;/p&gt;</description>
                <environment></environment>
            <key id="16201">DCSV-6</key>
            <summary>read-csv can not handle white-space at end of line</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="jonase">Jonas Enlund</assignee>
                                <reporter username="cvkemenade">Cees van Kemenade</reporter>
                        <labels>
                    </labels>
                <created>Fri, 24 May 2013 12:50:04 -0500</created>
                <updated>Fri, 24 May 2013 16:35:40 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="31154" author="cvkemenade" created="Fri, 24 May 2013 16:35:40 -0500"  >
&lt;p&gt;To take the issue a little further, the same holds for whitespace in the middle of a line between the closing-quote and the separator, see:&lt;br/&gt;
=&amp;gt; (read-csv (java.io.StringReader. &quot;\&quot;a\&quot; , 5\n \&quot;b,b\&quot;,\&quot;6\&quot;&quot; ))&lt;br/&gt;
Exception CSV error (unexpected character:  )  clojure.data.csv/read-quoted-cell (csv.clj:36)&lt;/p&gt;


&lt;p&gt;This raises the question what happens if you put a space between the separator and the opening quote (first the default case):&lt;br/&gt;
=&amp;gt; (read-csv (java.io.StringReader. &quot;\&quot;a\&quot;, 5\n\&quot;b\&quot;,\&quot;6\&quot;&quot; ))&lt;br/&gt;
(&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;a&amp;quot; &amp;quot; 5&amp;quot;&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;b&amp;quot; &amp;quot;6&amp;quot;&amp;#93;&lt;/span&gt;)&lt;/p&gt;

&lt;p&gt;Now adding one additional space:&lt;br/&gt;
=&amp;gt; (read-csv (java.io.StringReader. &quot;\&quot;a\&quot;, 5\n \&quot;b\&quot;,\&quot;6\&quot;&quot; ))&lt;br/&gt;
(&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;a&amp;quot; &amp;quot; 5&amp;quot;&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot; \&amp;quot;b\&amp;quot;&amp;quot; &amp;quot;6&amp;quot;&amp;#93;&lt;/span&gt;)&lt;/p&gt;

&lt;p&gt;Interesting, the white-space is considered to be the start of the string and the quote that follows is considered to be part of the tekst-value that is read.&lt;br/&gt;
The main reason for using quotes is to allow separators in text, so let us see that happens if we extend the string by putting a separator in it.&lt;br/&gt;
=&amp;gt; (read-csv (java.io.StringReader. &quot;\&quot;a\&quot;, 5\n \&quot;b,b\&quot;,\&quot;6\&quot;&quot; ))&lt;br/&gt;
(&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;a&amp;quot; &amp;quot; 5&amp;quot;&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot; \&amp;quot;b&amp;quot; &amp;quot;b\&amp;quot;&amp;quot; &amp;quot;6&amp;quot;&amp;#93;&lt;/span&gt;)&lt;/p&gt;

&lt;p&gt;Now we see that the separator is not quoted anymore and as expect, the line is interpreted to contain three values instead of two values.&lt;/p&gt;

&lt;p&gt;When using standard libraries the issues mentioned above usually do not appear. However, in custom code that emits csv-files or when doing small manual fixes in a csv it is easy to introduce such an issue/error and subsequently it is quit tough to analyse this issue correctly. &lt;br/&gt;
Therefore I would opt for a mode of operation where white-space before an opening-quote or after a closing quote are considered to be void (unless it is an escaped quote like &quot;&quot;).&lt;/p&gt;
</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[DCSV-1] pom.xml directives</title>
                <link>http://dev.clojure.org/jira/browse/DCSV-1</link>
                <project id="10074" key="DCSV">data.csv</project>
                        <description>&lt;p&gt;If you build data.csv alone with the current pom.xml you get a couple of warnings and test are not executed. With the recent versions of Maven, these warnings can break the build.&lt;/p&gt;

&lt;p&gt;A fixed (I hope!) version is attached.&lt;/p&gt;</description>
                <environment>Apache Maven 3.0.3 (r1075438; 2011-02-28 18:31:09+0100)&lt;br/&gt;
Maven home: /usr/share/maven&lt;br/&gt;
Java version: 1.6.0_29, vendor: Apple Inc.&lt;br/&gt;
Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home&lt;br/&gt;
Default locale: it_IT, platform encoding: MacRoman&lt;br/&gt;
OS name: &amp;quot;mac os x&amp;quot;, version: &amp;quot;10.7.2&amp;quot;, arch: &amp;quot;x86_64&amp;quot;, family: &amp;quot;mac&amp;quot;</environment>
            <key id="15216">DCSV-1</key>
            <summary>pom.xml directives</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="jonase">Jonas Enlund</assignee>
                                <reporter username="giorgio_v">Giorgio Valoti</reporter>
                        <labels>
                    </labels>
                <created>Fri, 10 Feb 2012 04:59:36 -0600</created>
                <updated>Fri, 10 Feb 2012 04:59:36 -0600</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                    <attachment id="10900" name="pom.xml" size="2182" author="giorgio_v" created="Fri, 10 Feb 2012 04:59:36 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10009">Fixed</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>
</channel>
</rss>