Use passed encoding to decode bytes