metafacture / metafacture-core

Core package of the Metafacture tool suite for metadata processing.
https://metafacture.org
Apache License 2.0
69 stars 34 forks source link

decode-csv struggles with escape sign "\" in string-values #496

Open TobiasNx opened 10 months ago

TobiasNx commented 10 months ago

https://metafacture.org/playground/?flux=inputFile%0A%7C+open-file%0A%7Cas-lines%0A%7Cdecode-csv%0A%7Cencode-json%0A%7Cprint%0A%3B&data=%22a%22%2C%22b\t%22%2C%22c\\t%22%2C%22\%22%2C%22\cd\%22

in:

"a","b\t","c\\t","\","\cd\"

FLUX:

open-file
|as-lines
|decode-csv
|encode-json
|print
;

out:

{"0":"a","1":"bt","2":"c\\t","3":"\",cd\""}
TobiasNx commented 9 months ago

This is relevant for: https://github.com/hbz/lobid-organisations/issues/486

TobiasNx commented 9 months ago

We could delete them with the help of a match pattern.