base100
base100 copied to clipboard
index out of bounds: the len is 1 but the index is 2 when trying to decode
[brain@ignatenko-w541 ~]$ echo "👟👜👣👣👦🐁" | base100 -d
thread 'main' panicked at 'index out of bounds: the len is 1 but the index is 2', src/main.rs:91:20
note: Run with `RUST_BACKTRACE=1` for a backtrace.
Aborted (core dumped)
weird enough when doing echo hello | base100 | base100 -d
, everything works fine
Try echo -n "👟👜👣👣👦🐁"
. The newline at the end is probably causing the panic, because it's only one byte instead of four.
Oh, that worked. Is there any way we can make newline to work? Also in output too.
Yeah, I can strip a newline off of the input and add one to the output. I'll have that in the next release.
Any news on this issue? I'm using "base100 --decode {path_to_file}" in my script, so I guess "echo -n" is not available for me. Is there an another workaround?
echo "Hallo Tristan wie geht es dir?" | base100 > out.txt
cat out.txt | base100 -d
this way it works