Encode and decode quoted printable and base64 strings