Ensure binary string encoding throughout