You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Gary Gregory <ga...@gmail.com> on 2014/03/27 16:49:11 UTC

[CSV] ASCII Delimited Text – Not CSV or TAB delimited text

FYI:

Has anyone seen this?

https://ronaldduncan.wordpress.com/2009/10/31/text-file-formats-ascii-delimited-text-not-csv-or-tab-delimited-text/

It actually makes sense. Good luck editing such files though...

I wonder if we should add a built-in format for this format?

Gary
-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: [CSV] ASCII Delimited Text - Not CSV or TAB delimited text

Posted by Benedikt Ritter <br...@apache.org>.
2014-03-28 15:15 GMT+01:00 Gary Gregory <ga...@gmail.com>:

> On Fri, Mar 28, 2014 at 5:09 AM, Benedikt Ritter <br...@apache.org>
> wrote:
>
> > 2014-03-27 17:28 GMT+01:00 sebb <se...@gmail.com>:
> >
> > > On 27 March 2014 15:49, Gary Gregory <ga...@gmail.com> wrote:
> > > > FYI:
> > > >
> > > > Has anyone seen this?
> > > >
> > > >
> > >
> >
> https://ronaldduncan.wordpress.com/2009/10/31/text-file-formats-ascii-delimited-text-not-csv-or-tab-delimited-text/
> > > >
> > > > It actually makes sense. Good luck editing such files though...
> > >
> > > Yes, how is one supposed to create them?
> > >
> > > I think those ASCII characters were used quite a lot in the early days
> > > of teletypes which had the appropriate keys.
> > > Also they were used in some serial line protocols.
> > >
> > > But of course once people needed to send binary data, escape codes or
> > > encoding had to be used.
> > >
> > > > I wonder if we should add a built-in format for this format?
> > >
> > > Are there (m)any files that use the format?
> > >
> > > Otherwise why bother ...
> > >
> >
> > I don't see this as a requirement for 1.0. Additional formats can easily
> > added in 1.1. Or does the API have to be changed to include this format?
> >
>
>
> IMO, this can be implemented now with a custom CSVFormat like any other
> format.
>
> The min level question is whether *we* should include a CSVFormat.ASCII
> constant.
>

not in 1.0


>
> The max level question is, as outlined in the blog, because that makes
> processing simpler, we should refactor our code to know about certain kinds
> of format where escaping is superfluous. This refactoring could require
> visible changes, or not, who knows.
>

since nobody know, I'll say release early, release often. We'll find out
after 1.0.


>
> But this is not 1.0 blocker.
>

Agreed.


>
> Gary
>
>
> >
> >
> > >
> > > > Gary
> > > > --
> > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > > Java Persistence with Hibernate, Second Edition<
> > > http://www.manning.com/bauer3/>
> > > > JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> > > > Spring Batch in Action <http://www.manning.com/templier/>
> > > > Blog: http://garygregory.wordpress.com
> > > > Home: http://garygregory.com/
> > > > Tweet! http://twitter.com/GaryGregory
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > For additional commands, e-mail: dev-help@commons.apache.org
> > >
> > >
> >
> >
> > --
> > http://people.apache.org/~britter/
> > http://www.systemoutprintln.de/
> > http://twitter.com/BenediktRitter
> > http://github.com/britter
> >
>
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> Java Persistence with Hibernate, Second Edition<
> http://www.manning.com/bauer3/>
> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> Spring Batch in Action <http://www.manning.com/templier/>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>



-- 
http://people.apache.org/~britter/
http://www.systemoutprintln.de/
http://twitter.com/BenediktRitter
http://github.com/britter

Re: [CSV] ASCII Delimited Text - Not CSV or TAB delimited text

Posted by Gary Gregory <ga...@gmail.com>.
On Fri, Mar 28, 2014 at 5:09 AM, Benedikt Ritter <br...@apache.org> wrote:

> 2014-03-27 17:28 GMT+01:00 sebb <se...@gmail.com>:
>
> > On 27 March 2014 15:49, Gary Gregory <ga...@gmail.com> wrote:
> > > FYI:
> > >
> > > Has anyone seen this?
> > >
> > >
> >
> https://ronaldduncan.wordpress.com/2009/10/31/text-file-formats-ascii-delimited-text-not-csv-or-tab-delimited-text/
> > >
> > > It actually makes sense. Good luck editing such files though...
> >
> > Yes, how is one supposed to create them?
> >
> > I think those ASCII characters were used quite a lot in the early days
> > of teletypes which had the appropriate keys.
> > Also they were used in some serial line protocols.
> >
> > But of course once people needed to send binary data, escape codes or
> > encoding had to be used.
> >
> > > I wonder if we should add a built-in format for this format?
> >
> > Are there (m)any files that use the format?
> >
> > Otherwise why bother ...
> >
>
> I don't see this as a requirement for 1.0. Additional formats can easily
> added in 1.1. Or does the API have to be changed to include this format?
>


IMO, this can be implemented now with a custom CSVFormat like any other
format.

The min level question is whether *we* should include a CSVFormat.ASCII
constant.

The max level question is, as outlined in the blog, because that makes
processing simpler, we should refactor our code to know about certain kinds
of format where escaping is superfluous. This refactoring could require
visible changes, or not, who knows.

But this is not 1.0 blocker.

Gary


>
>
> >
> > > Gary
> > > --
> > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > Java Persistence with Hibernate, Second Edition<
> > http://www.manning.com/bauer3/>
> > > JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> > > Spring Batch in Action <http://www.manning.com/templier/>
> > > Blog: http://garygregory.wordpress.com
> > > Home: http://garygregory.com/
> > > Tweet! http://twitter.com/GaryGregory
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > For additional commands, e-mail: dev-help@commons.apache.org
> >
> >
>
>
> --
> http://people.apache.org/~britter/
> http://www.systemoutprintln.de/
> http://twitter.com/BenediktRitter
> http://github.com/britter
>



-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: [CSV] ASCII Delimited Text - Not CSV or TAB delimited text

Posted by Benedikt Ritter <br...@apache.org>.
2014-03-27 17:28 GMT+01:00 sebb <se...@gmail.com>:

> On 27 March 2014 15:49, Gary Gregory <ga...@gmail.com> wrote:
> > FYI:
> >
> > Has anyone seen this?
> >
> >
> https://ronaldduncan.wordpress.com/2009/10/31/text-file-formats-ascii-delimited-text-not-csv-or-tab-delimited-text/
> >
> > It actually makes sense. Good luck editing such files though...
>
> Yes, how is one supposed to create them?
>
> I think those ASCII characters were used quite a lot in the early days
> of teletypes which had the appropriate keys.
> Also they were used in some serial line protocols.
>
> But of course once people needed to send binary data, escape codes or
> encoding had to be used.
>
> > I wonder if we should add a built-in format for this format?
>
> Are there (m)any files that use the format?
>
> Otherwise why bother ...
>

I don't see this as a requirement for 1.0. Additional formats can easily
added in 1.1. Or does the API have to be changed to include this format?


>
> > Gary
> > --
> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > Java Persistence with Hibernate, Second Edition<
> http://www.manning.com/bauer3/>
> > JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> > Spring Batch in Action <http://www.manning.com/templier/>
> > Blog: http://garygregory.wordpress.com
> > Home: http://garygregory.com/
> > Tweet! http://twitter.com/GaryGregory
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>


-- 
http://people.apache.org/~britter/
http://www.systemoutprintln.de/
http://twitter.com/BenediktRitter
http://github.com/britter

Re: [CSV] ASCII Delimited Text - Not CSV or TAB delimited text

Posted by sebb <se...@gmail.com>.
On 27 March 2014 15:49, Gary Gregory <ga...@gmail.com> wrote:
> FYI:
>
> Has anyone seen this?
>
> https://ronaldduncan.wordpress.com/2009/10/31/text-file-formats-ascii-delimited-text-not-csv-or-tab-delimited-text/
>
> It actually makes sense. Good luck editing such files though...

Yes, how is one supposed to create them?

I think those ASCII characters were used quite a lot in the early days
of teletypes which had the appropriate keys.
Also they were used in some serial line protocols.

But of course once people needed to send binary data, escape codes or
encoding had to be used.

> I wonder if we should add a built-in format for this format?

Are there (m)any files that use the format?

Otherwise why bother ...

> Gary
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> Java Persistence with Hibernate, Second Edition<http://www.manning.com/bauer3/>
> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> Spring Batch in Action <http://www.manning.com/templier/>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [CSV] ASCII Delimited Text – Not CSV or TAB delimited text

Posted by Hasan Diwan <ha...@gmail.com>.
Greg,
I misunderstood the thrust of your question. I disagree we need a
specialised format for this, as the first I've heard of these codes was in
your initial email. I've not seen them used "in the wild", as it were,
either. However, if there's enough pushback in the other direction, I'll
keep my views to myself. -- H


On 27 March 2014 09:43, Gary Gregory <ga...@gmail.com> wrote:

> On Thu, Mar 27, 2014 at 11:58 AM, Hasan Diwan <ha...@gmail.com>
> wrote:
>
> > Python (at least, maybe Ruby/perl as well) has a csv class whose
> > constructor takes a delimiter, defaulting to ","; R accomplishes the same
> > using read.table's sep parameter. OpenCSV, a Java class for manipulating
> > CSVs, also has a notion of a separator. It's not too difficult to add,
> I'd
> > be willing to do so, if there are enough "+1"s, let's say 4 in addition
> to
> > myself.
> >
>
> I am not sure what you are taking about because [csv] already does all
> this. The question is, more precisely, should we have a CSVFormat.ASCII
> constant using the ASCII codes from the blog post.
>
> Gary
>
> >
> >
> > On 27 March 2014 08:49, Gary Gregory <ga...@gmail.com> wrote:
> >
> > > FYI:
> > >
> > > Has anyone seen this?
> > >
> > >
> > >
> >
> https://ronaldduncan.wordpress.com/2009/10/31/text-file-formats-ascii-delimited-text-not-csv-or-tab-delimited-text/
> > >
> > > It actually makes sense. Good luck editing such files though...
> > >
> > > I wonder if we should add a built-in format for this format?
> > >
> > > Gary
> > > --
> > > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > > Java Persistence with Hibernate, Second Edition<
> > > http://www.manning.com/bauer3/>
> > > JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> > > Spring Batch in Action <http://www.manning.com/templier/>
> > > Blog: http://garygregory.wordpress.com
> > > Home: http://garygregory.com/
> > > Tweet! http://twitter.com/GaryGregory
> > >
> >
> >
> >
> > --
> > Sent from my mobile device
> > Envoyé de mon portable
> >
>
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> Java Persistence with Hibernate, Second Edition<
> http://www.manning.com/bauer3/>
> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> Spring Batch in Action <http://www.manning.com/templier/>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>



-- 
Sent from my mobile device
Envoyé de mon portable

Re: [CSV] ASCII Delimited Text – Not CSV or TAB delimited text

Posted by Gary Gregory <ga...@gmail.com>.
On Thu, Mar 27, 2014 at 11:58 AM, Hasan Diwan <ha...@gmail.com> wrote:

> Python (at least, maybe Ruby/perl as well) has a csv class whose
> constructor takes a delimiter, defaulting to ","; R accomplishes the same
> using read.table's sep parameter. OpenCSV, a Java class for manipulating
> CSVs, also has a notion of a separator. It's not too difficult to add, I'd
> be willing to do so, if there are enough "+1"s, let's say 4 in addition to
> myself.
>

I am not sure what you are taking about because [csv] already does all
this. The question is, more precisely, should we have a CSVFormat.ASCII
constant using the ASCII codes from the blog post.

Gary

>
>
> On 27 March 2014 08:49, Gary Gregory <ga...@gmail.com> wrote:
>
> > FYI:
> >
> > Has anyone seen this?
> >
> >
> >
> https://ronaldduncan.wordpress.com/2009/10/31/text-file-formats-ascii-delimited-text-not-csv-or-tab-delimited-text/
> >
> > It actually makes sense. Good luck editing such files though...
> >
> > I wonder if we should add a built-in format for this format?
> >
> > Gary
> > --
> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > Java Persistence with Hibernate, Second Edition<
> > http://www.manning.com/bauer3/>
> > JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> > Spring Batch in Action <http://www.manning.com/templier/>
> > Blog: http://garygregory.wordpress.com
> > Home: http://garygregory.com/
> > Tweet! http://twitter.com/GaryGregory
> >
>
>
>
> --
> Sent from my mobile device
> Envoyé de mon portable
>



-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: [CSV] ASCII Delimited Text – Not CSV or TAB delimited text

Posted by Hasan Diwan <ha...@gmail.com>.
Python (at least, maybe Ruby/perl as well) has a csv class whose
constructor takes a delimiter, defaulting to ","; R accomplishes the same
using read.table's sep parameter. OpenCSV, a Java class for manipulating
CSVs, also has a notion of a separator. It's not too difficult to add, I'd
be willing to do so, if there are enough "+1"s, let's say 4 in addition to
myself.


On 27 March 2014 08:49, Gary Gregory <ga...@gmail.com> wrote:

> FYI:
>
> Has anyone seen this?
>
>
> https://ronaldduncan.wordpress.com/2009/10/31/text-file-formats-ascii-delimited-text-not-csv-or-tab-delimited-text/
>
> It actually makes sense. Good luck editing such files though...
>
> I wonder if we should add a built-in format for this format?
>
> Gary
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> Java Persistence with Hibernate, Second Edition<
> http://www.manning.com/bauer3/>
> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> Spring Batch in Action <http://www.manning.com/templier/>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>



-- 
Sent from my mobile device
Envoyé de mon portable