csv-to-usv

Convert Comma Separated Values (CSV) to Unicode Separated Values (USV).

Syntax:

stdin | csv-to-usv | stdout

Example:

cat example.csv | csv-to-usv > example.usv

Install

Install:

cargo install csv-to-usv

Link: https://crates.io/crates/csv-to-usv

Example

Suppose file example.csv contains:

a,b,c
d,e,f
g,h,i

Run:

cat example.csv | csv-to-usv

Output:

a␟b␟c␟␞d␟e␟f␟␞g␟h␟i␟␞

FAQ

When to use this command?

Use this command when you want to convert from CSV to USV.

A typical use case is when you have CSV data, such as a spreadsheet export, and you want to convert it to USV, such as to make the data easier to view, or edit, or maintain.

Our real-world use case is converting a bunch of CSV spreadsheet exports from a variety of programs, including Excel, to USV so we're better-able to handle quoting, and multi-line data units, and Unicode characters in a wide variety of human languages.

Is there a similar command to convert from USV to CSV?

Yes: usv-to-csv.

Why use USV instead of CSV?

See the documentation for USV.

Is USV aiming to become a standard?

Yes and we've submitted the first draft of the USV standard to the IETF: link.

Help wanted

Constructive feedback welcome. Pull requests and feature requests welcome.

Tracking