4 ms·
>I do hope "Unicode Separated Values" takes off. It's essentially just a slight tweak to CSV where the delimiters are special unicode characters Commas can be
by Dalewyn 3y ago
>I do hope "Unicode Separated Values" takes off. It's essentially just a slight tweak to CSV where the delimiters are special unicode characters
Commas can be typed by anyone on any keyboard and readable by anyone.
Special Unicode Characters(tm) can't be typed by anyone on any keyboard and readable by noone.
Convenience is a virtue.
- hn_throwaway_99 3y agoI can't remember the last time I, or anyone I've ever worked with for that matter, ever typed up a CSV from scratch. The whole point of USV is that the delimiters can't normally be typed so you don't have to worry about escaping. USV supports displayable delimiters (see https://github.com/SixArm/usv https://github.com/SixArm/usv), so for the much more common case of editing an existing CSV in a text editor, you can just copy and paste.
- Dalewyn 3y agoI've valued the virtue of CSVs being readable by any text editor known to man, and I've occasionally edited them by hand. The pure simplicity of reading and typing commas trumps any value provided by more esoteric configurations. As for escaping, that's for the subsequent programmers (which could also be me) to figure out. If it is me, I'll deal with it because it keeps things simple.
- groestl 3y ago> I've occasionally edited them by hand. Yeah, usually when the quoting was f'up.
- albert_e 3y agoEveryone of us was a beginner at some point. The first time we came across CSV format we likely typed it in notepad by hand. A lot of issues with CSVs are also sometimes troubleshooted by hand-- by manually fixing a quote or a comma. There is value is the ability to do this level of editing and troubleshooting.
- hn_throwaway_99 3y ago> The first time we came across CSV format we likely typed it in notepad by hand. Again, I'm not saying CSVs aren't edited by hand in a text editor, I'm saying they aren't created from scratch in a text editor, even by beginners. USVs are easy to edit in a text editor, too, and I tried viewing and editing USVs with a couple different fonts and had no problems.
- iainmerrick 3y agoIf the separators can't easily be typed, how do you add a new cell?
- scbrg 3y agoNobody can type up a GIF image, or Word document in a Notepad, yet files of both those formats exist. The answer obviously is tooling. If a format with sane separators was common, so would editors that could edit that format be.
- iainmerrick 3y agoI was responding to the GP's: USVs are easy to edit in a text editor I don't see how that's the case. If a format with sane separators was common, so would editors that could edit that format be Sure, but that's a hypothetical future editor, not something that currently exists. Edit to add: I also disagree with "sane" in that context. New separators won't solve anything. You'll always need escaping/encoding/encapsulation; get that right and everything else follows. JSON is comma-separated and does just fine.
- hn_throwaway_99 3y agoCopy and paste.
- eviks 3y agoNo we didn't, we likely typed in Excel by double clicking on our first csv
- deathanatos 3y ago> Special Unicode Characters(tm) can't be typed by anyone on any keyboard and readable by noone. While I'm not a fan of USV, I do believe it is type-able on both macOS and Linux¹. The IME's character picker in both OSes contains all of the necessary characters, I think. (I use "" in commit messages, occasionally. That was a typed , not copy/pasted from a Google query or such.) It would be quite tedious, I do admit; reasonably typed by someone, probably not. I don't normally type out CSVs by hand either, though. (¹I don't know about Windows as I simply haven't cared about it in years. For all I know, they've grown an IME in the intervening decade.)
- bee_rider 3y agoWould it be possible to just type the file using commas, semicolons, or pipes or something (whatever you happen to know you don’t have in your file) and then convert them using sed?
- deathanatos 3y agoYes, it would be possible. You'd have to make sure the character didn't appear / no escaping at all was present, which the data may or may not allow. Might as well just get a dedicated CSV→USV converter, though. (I have a variant of this problem in JSON→YAML … usually I just shove one into the other & pray, akin to your sed solution.)
- al_borland 3y agoEven if the csv isn’t being typed out by hand, when importing into Excel and the delimiter needs to be manually entered, because it isn’t one of the common ones Excel has a radio button for… it is nice to be able to easily type it.
- deathanatos 3y agoWhile I can see a convenience argument for the somewhat contrived case of typing an entire file out by hand, entering the character once for the import does not seem like a great bar. > it is nice to be able to easily type it. Again, that's where an IME is helpful; on the OSes I mention, it's "␞" is: macOS: ⌘+^+Space, "record", <arrows to select>, Enter Linux: Super+e, "record", Space, Space, <arrows>, Enter The process is highly visual on both, so you're getting feedback about whether you're about to hit the right character, or not. (And like, if you have the file, you can always ^C ^V the character, if say you don't know how to IME, or you don't know what the name of the char is, etc.…)