encode text and subject