Fix encodings and YAML engine

Signed-off-by: Aki Saarinen <aki@akisaarinen.fi>