Обсуждение: Improper CSV export delimiter

Поиск
Список
Период
Сортировка

Improper CSV export delimiter

От
Aren Cambre
Дата:
Bug report:

When I use File > Export from a Query window, it's clearly trying to make a CSV. The suggested filename is suffixed with .csv.

The problem is the semicolon character is selected by default. That is not CSV. Please change this so the comma is the default delimiter.

Now, I understand semicolon is the standard in certain regions (e.g., France?), but the vast majority of cases, comma is the norm. If semicolon is selected by default, it should only be because regional OS settings are detected that recommend this.

Aren

Re: Improper CSV export delimiter

От
Thom Brown
Дата:
On 6 November 2010 21:08, Aren Cambre <aren@arencambre.com> wrote:
Bug report:

When I use File > Export from a Query window, it's clearly trying to make a CSV. The suggested filename is suffixed with .csv.

Are you sure that isn't just there because that's the last filename you used?  Mine doesn't default to anything. If I click on the ellipsis and type a filename without an extension into the file browser and click OK, it just comes up with the path and the filename I typed without an extension.

--
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935

Re: Improper CSV export delimiter

От
Guillaume Lelarge
Дата:
Le 06/11/2010 22:19, Thom Brown a écrit :
> On 6 November 2010 21:08, Aren Cambre <aren@arencambre.com> wrote:
> 
>> Bug report:
>>
>> When I use File > Export from a Query window, it's clearly trying to make a
>> CSV. The suggested filename is suffixed with .csv.
>>
> 
> Are you sure that isn't just there because that's the last filename you
> used?  Mine doesn't default to anything. If I click on the ellipsis and type
> a filename without an extension into the file browser and click OK, it just
> comes up with the path and the filename I typed without an extension.
> 

+1

More to the point, all this dialog knows is that you want to export
data. It doesn't know what CSV is. If your file is suffixed with .csv,
.txt, .xls, .<whichever weird suffix you put last time>, it doesn't
care. It doesn't know what this suffix means. It doesn't even know that
it could mean something. So, right now, it cannot pre-select specific
items that should be related with your file suffix.

Moreover, the value you have as a column separator comes from your last
export. You probably set it to a semi-colon the last time you used the
Export functionality.

Anyway, it would be a really good thing to "beautify" this dialog. It's
actually really horrible. And maybe, while we are at it, we could add
this kind of functionality.


-- 
Guillaumehttp://www.postgresql.frhttp://dalibo.com


Re: Improper CSV export delimiter

От
Aren Cambre
Дата:
Maybe. But if I click on the ellipsis, the Windows dialog has CSV preselected in Save as type, even if the prior extension isn't CSV.

But even more strongly, all the settings on the Export data to file dialog are CSV-compliant except that one. Shouldn't common standards be the default? What value is there in being "almost" CSV vs. being truly CSV?

The problem with this is when you save a CSV with semicolons instead of commas, other programs may not recognize the file. Already ran into a problem importing into Excel with semicolon separations. So if I forget change to comma, I may end up doing an export and may risk a complex CSV edit later. (It's simple if you're just replacing ";" with "," but can be complex in certain scenarios.)

Aren

On Sat, Nov 6, 2010 at 4:19 PM, Thom Brown <thom@linux.com> wrote:
On 6 November 2010 21:08, Aren Cambre <aren@arencambre.com> wrote:
Bug report:

When I use File > Export from a Query window, it's clearly trying to make a CSV. The suggested filename is suffixed with .csv.

Are you sure that isn't just there because that's the last filename you used?  Mine doesn't default to anything. If I click on the ellipsis and type a filename without an extension into the file browser and click OK, it just comes up with the path and the filename I typed without an extension.

--
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935

Re: Improper CSV export delimiter

От
Aren Cambre
Дата:
Moreover, the value you have as a column separator comes from your last
export. You probably set it to a semi-colon the last time you used the
Export functionality.

This was the first time I ever used the dialog.

Aren

Re: Improper CSV export delimiter

От
Guillaume Lelarge
Дата:
Le 06/11/2010 23:14, Aren Cambre a écrit :
>>
>> Moreover, the value you have as a column separator comes from your last
>> export. You probably set it to a semi-colon the last time you used the
>> Export functionality.
>>
> 
> This was the first time I ever used the dialog.
> 

Someone else could have used it.

Anyway, I can't reproduce this.


-- 
Guillaumehttp://www.postgresql.frhttp://dalibo.com


Re: Improper CSV export delimiter

От
Guillaume Lelarge
Дата:
Le 06/11/2010 23:13, Aren Cambre a écrit :
> Maybe. But if I click on the ellipsis, the Windows dialog has CSV
> preselected in *Save as type*, even if the prior extension isn't CSV.
> 

Because it's the first one in the list of "often used" extensions. We
don't really *want* it to be preselected. It happens to be so because
it's the first item of the list.

> But even more strongly, all the settings on the *Export data to file* dialog
> are CSV-compliant except that one. Shouldn't common standards be the
> default?

Yes.

> What value is there in being "almost" CSV vs. being truly CSV?
> 

None.

Except that everyone has his definition of CSV. Mine would be to use
comma (hence the acronym :) ). Others don't have the same feelings.

> The problem with this is when you save a CSV with semicolons instead of
> commas, other programs may not recognize the file. Already ran into a
> problem importing into Excel with semicolon separations. So if I forget
> change to comma, I may end up doing an export and may risk a complex CSV
> edit later. (It's simple if you're just replacing *";"* with *","* but can
> be complex in certain scenarios.)
> 

I don't know for new ones as I don't use Excel these days. Old Excel
releases always wanted to use ";" instead of "," for CSV files.

Which is not a good enough reason to use ";" instead of ",".

It would be interesting to review this dialog.


-- 
Guillaumehttp://www.postgresql.frhttp://dalibo.com


Re: Improper CSV export delimiter

От
Aren Cambre
Дата:
Someone else could have used it.

Anyway, I can't reproduce this.

It's my personal laptop. Guaranteed no other users.

If you can't reproduce, I may be mistaken.

Aren

Re: Improper CSV export delimiter

От
Guillaume Lelarge
Дата:
Le 08/11/2010 03:29, Aren Cambre a écrit :
>>
>> Someone else could have used it.
>>
>> Anyway, I can't reproduce this.
>>
> 
> It's my personal laptop. Guaranteed no other users.
> 
> If you can't reproduce, I may be mistaken.
> 

I created a ticket to remind us to work on this dialog. Hope I can do it
before 1.14.


-- 
Guillaumehttp://www.postgresql.frhttp://dalibo.com