You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
qsv fmt --ascii uses the ASCII unit separator (U+001F) as the
record delimiter and the ASCII record separator (U+001E) as the record terminator. The point is to use metacharacters that don’t appear in
regular ASCII text; these characters are neither part of the printable
character subset, nor the whitespace control codes.
But it still uses " as the quote character. That means that data that
contains quotes will need to be quoted using this printable character.
Example CSV:
"he""ll""o","world"
"goodbye","world"
Formatting that with --ascii (using escape codes for unit/record):
$ cargo run --features="feature_capable" --bin=qsv fmt --ascii test-ascii.txt
"he""ll""o"\x1fworld\x1egoodbye\x1fworld\x1e
So you’ve avoided the \n and , metacharacters. But the regular-text
metacharacter " is still there.
Without " as the quote character you would be able to use any kind of
printable/whitespace Unicode text without having to quote any of the data.
Describe the solution you'd like
Use another non-whitespace control code as the quote character. For
example “Substitute” (U+001A).
Describe alternatives you've considered
You can achieve this by adding --quote=$'\x1A':
cargo run --features="feature_capable" --bin=qsv fmt --ascii --quote=$'\x1A' test-ascii.txt
Additional context
_
The text was updated successfully, but these errors were encountered:
`qsv fmt --ascii` uses the ASCII unit separator (U+001F) as the
record *delimiter* and the ASCII record separator (U+001E) as the record
*terminator*. The point is to use metacharacters that don’t appear in
regular ASCII text; these characters are neither part of the printable
character subset, nor the whitespace control codes.
But it still uses `"` as the quote character. That means that data that
contains quotes will need to be quoted using this printable character.
All metacharacters (delimiter, terminator, and quote) being non-whitespace
control codes would enable you to write out any regular text (printable
character or whitespace) without “quotations”.
Use the control code ASCII “Substitute” (U+001A) as the quote character.
Fixes: dathere#1074
Is your feature request related to a problem? Please describe.
qsv fmt --ascii
uses the ASCII unit separator (U+001F) as therecord delimiter and the ASCII record separator (U+001E) as the record
terminator. The point is to use metacharacters that don’t appear in
regular ASCII text; these characters are neither part of the printable
character subset, nor the whitespace control codes.
But it still uses
"
as the quote character. That means that data thatcontains quotes will need to be quoted using this printable character.
Example CSV:
Formatting that with
--ascii
(using escape codes for unit/record):So you’ve avoided the
\n
and,
metacharacters. But the regular-textmetacharacter
"
is still there.Without
"
as the quote character you would be able to use any kind ofprintable/whitespace Unicode text without having to quote any of the data.
Describe the solution you'd like
Use another non-whitespace control code as the quote character. For
example “Substitute” (U+001A).
Describe alternatives you've considered
You can achieve this by adding
--quote=$'\x1A'
:Additional context
_
The text was updated successfully, but these errors were encountered: