The non-ascii character ('\ 255') is simply displayed in decimal rather than octal.
Confirmation, according to od
, the first 4 bytes are valid, in octal / ascii or 1 byte decimal:
> $ od -c foo.idx | head -1 0000000 377 t O c \0 \0 \0 002 \0 \0 002 250 \0 \0 005 B > $ od -t u1 /tmp/x | head -1 0000000 255 116 79 99 0 0 0 2 0 0 2 168 0 0 5 66
And in Haskell:
> s <- Data.ByteString.readFile "foo.idx" > Data.ByteString.take 4 s "\255tOc"
So, just remember that 255 in decimal is equal to 377 in octal.
source share