13 ms·
Doesn't mention utf-8, so I'll assume it dies as soon as I type something strange like an ö in my foolish attempt to categorize a thing outside of the US.
by Trombone12 12y ago
Doesn't mention utf-8, so I'll assume it dies as soon as I type something strange like an ö in my foolish attempt to categorize a thing outside of the US.
- onli 12y agoWhy would you think that? If it is really old that may be possible, but everything halfway current and maintained should support UTF-8 by default by now, especially in the linux world. And in fact, it is working fine. I took the example from https://www.gnu.org/software/recutils/manual/recutils.html#A-Little-Example https://www.gnu.org/software/recutils/manual/recutils.html#A... and exchanged Emacs with Ämacs, and the selector works ~$ recsel -e "Title ~ '.*Ämacs.*'" -P Title books.rec GNU Ämacs Manual
- falcolas 12y agoThis is a bit worrisome, but they're pretty explicit where they require ASCII, so I'm willing to give them the benefit of the doubt until proven otherwise. Interesting format, though, with some definite benefits over other text storage formats.
- networked 12y agoAccording to the manual [1] the format requires that field names match [a-zA-Z%][a-zA-Z0-9_]* but it allows any characters in the value other than an unescaped newline. For example, the command echo "\"country\",population\nÖsterreich,8.58" | csv2rec --strict | rec2csv works as expected. Somewhat worryingly, the format specification does not say anything about \0. I'd rather see use of \0 explicitly prohibited. I have found one place where the field name rule may not be enforced properly. It appears that csv2rec will use a noncompliant column name from a CSV file header as a key even in strict mode; however, rec2csv or relset will not accept the output it generates as input. I.e., echo "Österreich_population\n8.58" | csv2rec --strict | rec2csv blows up on rec2csv rather than on csv2rec (which is what I think should happen). [1] http://www.gnu.org/software/recutils/manual/recutils.html#The-Rec-Format http://www.gnu.org/software/recutils/manual/recutils.html#Th...