did writeEncodedText