deutsche-nationalbibliothek / pica-rs

Tools to work with bibliographic records encoded in PICA+.
https://deutsche-nationalbibliothek.github.io/pica-rs/
European Union Public License 1.2
32 stars 5 forks source link

Pipelining of commands fails (PowerShell) #371

Open nwagner84 opened 2 years ago

nwagner84 commented 2 years ago

Pipelining of commands fails using PowerShell because the output encoding of the records written to stdout is changed by the shell. Running each command separatly and write an output file, which will be read of the second command, works fine. I already tried to change the $OutputEncoding setting to UTF-8, but this seems not to fix the problem.

Unless it is possbile to describe how to fix this issue, the documention should recommend cmd.exe instead of PowerShell.

CC: @a-wendler

a-wendler commented 2 years ago

Ich glaube es liegt daran, dass die PowerShell nicht wie stdin funktioniert: https://stackoverflow.com/questions/66245884/piping-a-string-into-a-cmd-does-not-work-in-powershell-script Der zweite Befehl kann nicht von stdin lesen, sondern man müsste das eigens implementieren. Das dürfte bedeuten: no pica-rs in PowerShell, wenn man pipes braucht.