Render byte[] properly in the cli

We recently noticed that the cli doesn't render byte[] properly (reported in #1663). This patch fixes that.
What happens if the byte array does not contain UTF-8 data?