Decoding a binary file before using it as text