1. Michael Overmeyer
  2. Valentina Studio
  3. Montag, April 10 2017, 03:07 PM
  4.  Abonnieren via E-Mail
In cases where your column contains a Field Delimiter, Valentina Studio does not quote the value.

For example:
If you have a table with two columns, A and B, with a single row:

A | B
'1,2,3,4,5' | '6,7,8,9,10'

And you export the results as CSV with Field Delimiter (COMMA), you will get 10 columns, instead of just 2:

1,2,3,4,5,6,7,8,9,10

Instead of:

"1,2,3,4,5","6,7,8,9,10"

The Quote Character is typically double quotes (";), but people sometimes use other values.

There is one more wrinkle to the CSV format that needs to be handled as well: the case where the values also contain the Quote Character.

In this case, you double up the Quote Character.

For instance the value '1,2,"3",4,5' becomes "1,2,""3"",4,5" on output.

Valentina Studio (7.0.3) allows you to specify a Field Delimiter and Line Delimiter when exporting to CSV.
It should also allow you to specify a "Quote Character" and an "Escape Character" and write out CSV's properly.

This should be simple to add, since any CSV library for your language will already have support for quote and escape characters.

References:
See "quote_character" and "escape_character" in https://www.postgresql.org/docs/9.6/static/sql-copy.html
https://docs.python.org/3.5/library/csv.html#dialects-and-formatting-parameters
Kommentar
There are no comments made yet.
Sergey Pashkov Akzeptierte Antwort
Hello Michael,

Thanks for reporting it.
I've created an issue in the bug tracker http://valentina-db.com/bt/view.php?id=7931
Kommentar
There are no comments made yet.
  • Seite :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 2 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories