A text (de)encoder