OK, I’ve updated the patch so that the first bytes will only be kept in the buffer if they are a prefix of the BOM. —Walter