Re: Bindy csv and generateHeaderColumns doesnt work with tabs

2011-11-10 Thread marcelk
This is for the latest 2.8.2 version.

--
View this message in context: 
http://camel.465427.n5.nabble.com/Bindy-csv-and-generateHeaderColumns-doesnt-work-with-tabs-tp4982555p4982563.html
Sent from the Camel Development mailing list archive at Nabble.com.


Bindy csv and generateHeaderColumns doesnt work with tabs

2011-11-10 Thread marcelk
Hi,

I noticed that when using generateHeaderColumns the header generated doesnt
have the right seperator as in the content:

@CsvRecord(separator = "\\t", generateHeaderColumns=true, crlf="WINDOWS")

This produces:
orderNr\tfirstName
10  Marcel

I would expect the \t to be handled as tab.

So how can I fix this? Should I create a JIRA?

Thx, Marcel

--
View this message in context: 
http://camel.465427.n5.nabble.com/Bindy-csv-and-generateHeaderColumns-doesnt-work-with-tabs-tp4982555p4982555.html
Sent from the Camel Development mailing list archive at Nabble.com.


Re: Bindy csv and generateHeaderColumns doesnt work with tabs

2011-11-11 Thread marcelk
Hi Claus,

I dont have much time at the moment but I created a JUnit test and a patch.
I'll try to add things the right way later.

The patch I have is:
Index: src/main/java/org/apache/camel/dataformat/bindy/BindyCsvFactory.java
===
--- src/main/java/org/apache/camel/dataformat/bindy/BindyCsvFactory.java   
(revision 1201023)
+++ src/main/java/org/apache/camel/dataformat/bindy/BindyCsvFactory.java   
(working copy)
@@ -470,7 +470,8 @@

 Map dataFieldsSorted = new TreeMap(dataFields);
 Iterator it = dataFieldsSorted.keySet().iterator();
-
+
+char separator = Converter.getCharDelimitor(this.getSeparator());
 StringBuilder builderHeader = new StringBuilder();

 while (it.hasNext()) {


--
View this message in context: 
http://camel.465427.n5.nabble.com/Bindy-csv-and-generateHeaderColumns-doesnt-work-with-tabs-tp4982555p4985495.html
Sent from the Camel Development mailing list archive at Nabble.com.