encoder implementations for all formats except html