mg.c: _get_encoding needs dVAR